* this connection. The protocols must have been listed by * getSupportedProtocols() as being supported. * * @param protocols protocols to enable. * @exception IllegalArgumentException when one of the protocols * named by the parameter is not supported. */ synchronized public void setEnabledProtocols(String[] protocols) { enabledProtocols = new ProtocolList(protocols); if ((handshaker != null) && !handshaker.activated()) { handshaker.setEnabledProtocols(enabledProtocols); } } synchronized public String[] getEnabledProtocols() { return enabledProtocols.toStringArray(); } /** * Returns the SSLParameters in effect for this SSLEngine. */ synchronized public SSLParameters getSSLParameters() { SSLParameters params = super.getSSLParameters(); // the super implementation does not handle the following parameters params.setEndpointIdentificationAlgorithm(identificationProtocol); params.setAlgorithmConstraints(algorithmConstraints); return params; } /** * Applies SSLParameters to this engine. */ synchronized public void setSSLParameters(SSLParameters params) { super.setSSLParameters(params); // the super implementation does not handle the following parameters identificationProtocol = params.getEndpointIdentificationAlgorithm(); algorithmConstraints = params.getAlgorithmConstraints(); if ((handshaker != null) && !handshaker.started()) { handshaker.setIdentificationProtocol(identificationProtocol); handshaker.setAlgorithmConstraints(algorithmConstraints); } } /** * Return the name of the current thread. Utility method. */ private static String threadName() { return Thread.currentThread().getName(); } /** * Returns a printable representation of this end of the connection. */ public String toString() { StringBuilder retval = new StringBuilder(80); retval.append(Integer.toHexString(hashCode())); retval.append("["); retval.append("SSLEngine[hostname="); String host = getPeerHost(); retval.append((host == null) ? "null" : host); retval.append(" port="); retval.append(Integer.toString(getPeerPort())); retval.append("] "); retval.append(getSession().getCipherSuite()); retval.append("]"); return retval.toString(); }}Lines 2001–2073 of 2073. Previous lines
* this connection. The protocols must have been listed by * getSupportedProtocols() as being supported. * * @param protocols protocols to enable. * @exception IllegalArgumentException when one of the protocols * named by the parameter is not supported. */ synchronized public void setEnabledProtocols(String[] protocols) { enabledProtocols = new ProtocolList(protocols); if ((handshaker != null) && !handshaker.activated()) { handshaker.setEnabledProtocols(enabledProtocols); } } synchronized public String[] getEnabledProtocols() { return enabledProtocols.toStringArray(); } /** * Returns the SSLParameters in effect for this SSLEngine. */ synchronized public SSLParameters getSSLParameters() { SSLParameters params = super.getSSLParameters(); // the super implementation does not handle the following parameters params.setEndpointIdentificationAlgorithm(identificationProtocol); params.setAlgorithmConstraints(algorithmConstraints); return params; } /** * Applies SSLParameters to this engine. */ synchronized public void setSSLParameters(SSLParameters params) { super.setSSLParameters(params); // the super implementation does not handle the following parameters identificationProtocol = params.getEndpointIdentificationAlgorithm(); algorithmConstraints = params.getAlgorithmConstraints(); if ((handshaker != null) && !handshaker.started()) { handshaker.setIdentificationProtocol(identificationProtocol); handshaker.setAlgorithmConstraints(algorithmConstraints); } } /** * Return the name of the current thread. Utility method. */ private static String threadName() { return Thread.currentThread().getName(); } /** * Returns a printable representation of this end of the connection. */ public String toString() { StringBuilder retval = new StringBuilder(80); retval.append(Integer.toHexString(hashCode())); retval.append("["); retval.append("SSLEngine[hostname="); String host = getPeerHost(); retval.append((host == null) ? "null" : host); retval.append(" port="); retval.append(Integer.toString(getPeerPort())); retval.append("] "); retval.append(getSession().getCipherSuite()); retval.append("]"); return retval.toString(); } }