2227 maximumPacketSize = params.getMaximumPacketSize();
2228
2229 if (maximumPacketSize != 0) {
2230 outputRecord.changePacketSize(maximumPacketSize);
2231 } else {
2232 // use the implicit maximum packet size.
2233 maximumPacketSize = outputRecord.getMaxPacketSize();
2234 }
2235
2236 List<SNIServerName> sniNames = params.getServerNames();
2237 if (sniNames != null) {
2238 serverNames = sniNames;
2239 }
2240
2241 Collection<SNIMatcher> matchers = params.getSNIMatchers();
2242 if (matchers != null) {
2243 sniMatchers = matchers;
2244 }
2245 applicationProtocols = params.getApplicationProtocols();
2246
2247 if ((handshaker != null) && !handshaker.started()) {
2248 handshaker.setIdentificationProtocol(identificationProtocol);
2249 handshaker.setAlgorithmConstraints(algorithmConstraints);
2250 handshaker.setMaximumPacketSize(maximumPacketSize);
2251 handshaker.setApplicationProtocols(applicationProtocols);
2252 if (roleIsServer) {
2253 handshaker.setSNIMatchers(sniMatchers);
2254 handshaker.setUseCipherSuitesOrder(preferLocalCipherSuites);
2255 } else {
2256 handshaker.setSNIServerNames(serverNames);
2257 }
2258 }
2259 }
2260
2261 @Override
2262 public synchronized String getApplicationProtocol() {
2263 return applicationProtocol;
2264 }
2265
2266 @Override
2267 public synchronized String getHandshakeApplicationProtocol() {
|
2227 maximumPacketSize = params.getMaximumPacketSize();
2228
2229 if (maximumPacketSize != 0) {
2230 outputRecord.changePacketSize(maximumPacketSize);
2231 } else {
2232 // use the implicit maximum packet size.
2233 maximumPacketSize = outputRecord.getMaxPacketSize();
2234 }
2235
2236 List<SNIServerName> sniNames = params.getServerNames();
2237 if (sniNames != null) {
2238 serverNames = sniNames;
2239 }
2240
2241 Collection<SNIMatcher> matchers = params.getSNIMatchers();
2242 if (matchers != null) {
2243 sniMatchers = matchers;
2244 }
2245 applicationProtocols = params.getApplicationProtocols();
2246
2247 if ((handshaker != null) && !handshaker.activated()) {
2248 handshaker.setIdentificationProtocol(identificationProtocol);
2249 handshaker.setAlgorithmConstraints(algorithmConstraints);
2250 handshaker.setMaximumPacketSize(maximumPacketSize);
2251 handshaker.setApplicationProtocols(applicationProtocols);
2252 if (roleIsServer) {
2253 handshaker.setSNIMatchers(sniMatchers);
2254 handshaker.setUseCipherSuitesOrder(preferLocalCipherSuites);
2255 } else {
2256 handshaker.setSNIServerNames(serverNames);
2257 }
2258 }
2259 }
2260
2261 @Override
2262 public synchronized String getApplicationProtocol() {
2263 return applicationProtocol;
2264 }
2265
2266 @Override
2267 public synchronized String getHandshakeApplicationProtocol() {
|