Package org.bouncycastle.jsse
Interface BCSSLSocket
-
public interface BCSSLSocketA BCJSSE-specific interface to expose extended functionality onSSLSocketimplementations.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidconnect(java.lang.String host, int port, int timeout)java.lang.StringgetApplicationProtocol()BCApplicationProtocolSelector<javax.net.ssl.SSLSocket>getBCHandshakeApplicationProtocolSelector()BCExtendedSSLSessiongetBCHandshakeSession()BCExtendedSSLSessiongetBCSession()BCSSLConnectiongetConnection()Returns an accessor for extended SSL connection data.java.lang.StringgetHandshakeApplicationProtocol()BCSSLParametersgetParameters()Returns aBCSSLParameterswith properties reflecting the current configuration.voidsetBCHandshakeApplicationProtocolSelector(BCApplicationProtocolSelector<javax.net.ssl.SSLSocket> selector)voidsetBCSessionToResume(BCExtendedSSLSession session)voidsetHost(java.lang.String host)Allows explicit setting of the 'host'Stringwhen theSocketFactorymethods that include it as an argument are not used.voidsetParameters(BCSSLParameters parameters)Sets parameters according to the properties in aBCSSLParameters.
-
-
-
Method Detail
-
connect
void connect(java.lang.String host, int port, int timeout) throws java.io.IOException- Throws:
java.io.IOException
-
getApplicationProtocol
java.lang.String getApplicationProtocol()
-
getBCHandshakeApplicationProtocolSelector
BCApplicationProtocolSelector<javax.net.ssl.SSLSocket> getBCHandshakeApplicationProtocolSelector()
-
setBCHandshakeApplicationProtocolSelector
void setBCHandshakeApplicationProtocolSelector(BCApplicationProtocolSelector<javax.net.ssl.SSLSocket> selector)
-
setBCSessionToResume
void setBCSessionToResume(BCExtendedSSLSession session)
-
getBCHandshakeSession
BCExtendedSSLSession getBCHandshakeSession()
-
getBCSession
BCExtendedSSLSession getBCSession()
-
getConnection
BCSSLConnection getConnection()
Returns an accessor for extended SSL connection data. This method will initiate the initial handshake if necessary and then block until the handshake has been established. If an error occurs during the initial handshake, this method returnsnull.- Returns:
- A
BCSSLConnectioninstance.
-
getHandshakeApplicationProtocol
java.lang.String getHandshakeApplicationProtocol()
-
getParameters
BCSSLParameters getParameters()
Returns aBCSSLParameterswith properties reflecting the current configuration.- Returns:
- the current
parameters
-
setHost
void setHost(java.lang.String host)
Allows explicit setting of the 'host'Stringwhen theSocketFactorymethods that include it as an argument are not used.Must be called prior to attempting to connect the socket to have any effect.
- Parameters:
host- the server host name with which to connect, ornullfor the loopback address.
-
setParameters
void setParameters(BCSSLParameters parameters)
Sets parameters according to the properties in aBCSSLParameters.Note that any properties set to null will be ignored, which will leave the corresponding settings unchanged.
- Parameters:
parameters- theparametersto set- Throws:
java.lang.IllegalArgumentException- if the cipherSuites or protocols properties contain unsupported values
-
-