@NotMutable @ThreadSafety(level=COMPLETELY_THREADSAFE) public final class SynchronizedSSLSocketFactory extends javax.net.ssl.SSLSocketFactory
Constructor and Description |
---|
SynchronizedSSLSocketFactory(javax.net.ssl.SSLSocketFactory factory)
Creates a new synchronous socket factory instance that will wrap the
provided socket factory.
|
Modifier and Type | Method and Description |
---|---|
java.net.Socket |
createSocket(java.net.InetAddress address,
int port)
Creates a new SSL socket to the specified server.
|
java.net.Socket |
createSocket(java.net.InetAddress address,
int port,
java.net.InetAddress localAddress,
int localPort)
Creates a new SSL socket to the specified server.
|
java.net.Socket |
createSocket(java.net.Socket s,
java.lang.String host,
int port,
boolean autoClose)
Creates a new SSL socket that wraps the provided socket.
|
java.net.Socket |
createSocket(java.lang.String host,
int port)
Creates a new SSL socket to the specified server.
|
java.net.Socket |
createSocket(java.lang.String host,
int port,
java.net.InetAddress localAddress,
int localPort)
Creates a new SSL socket to the specified server.
|
java.lang.String[] |
getDefaultCipherSuites()
Retrieves the set of cipher suites which are enabled by default.
|
java.lang.String[] |
getSupportedCipherSuites()
Retrieves the entire set of cipher suites that could be used.
|
javax.net.ssl.SSLSocketFactory |
getWrappedSocketFactory()
Retrieves the
SSLSocketFactory instance wrapped by this
synchronized SSL socket factory. |
public SynchronizedSSLSocketFactory(@NotNull javax.net.ssl.SSLSocketFactory factory)
factory
- The socket factory to be wrapped.@NotNull public javax.net.ssl.SSLSocketFactory getWrappedSocketFactory()
SSLSocketFactory
instance wrapped by this
synchronized SSL socket factory.SSLSocketFactory
instance wrapped by this synchronized
SSL socket factory.@NotNull public java.net.Socket createSocket(@NotNull java.lang.String host, int port) throws java.io.IOException
createSocket
in class javax.net.SocketFactory
host
- The host to which the connection should be established.port
- The port to which the connection should be established.java.io.IOException
- If a problem occurs while creating the socket.@NotNull public java.net.Socket createSocket(@NotNull java.lang.String host, int port, @NotNull java.net.InetAddress localAddress, int localPort) throws java.io.IOException
createSocket
in class javax.net.SocketFactory
host
- The host to which the connection should be
established.port
- The port to which the connection should be
established.localAddress
- The local address to use for the connection.localPort
- The local port to use for the connection.java.io.IOException
- If a problem occurs while creating the socket.@NotNull public java.net.Socket createSocket(@NotNull java.net.InetAddress address, int port) throws java.io.IOException
createSocket
in class javax.net.SocketFactory
address
- The address to which the connection should be established.port
- The port to which the connection should be established.java.io.IOException
- If a problem occurs while creating the socket.@NotNull public java.net.Socket createSocket(@NotNull java.net.InetAddress address, int port, @NotNull java.net.InetAddress localAddress, int localPort) throws java.io.IOException
createSocket
in class javax.net.SocketFactory
address
- The address to which the connection should be
established.port
- The port to which the connection should be
established.localAddress
- The local address to use for the connection.localPort
- The local port to use for the connection.java.io.IOException
- If a problem occurs while creating the socket.@NotNull public java.net.Socket createSocket(@NotNull java.net.Socket s, @NotNull java.lang.String host, int port, boolean autoClose) throws java.io.IOException
createSocket
in class javax.net.ssl.SSLSocketFactory
s
- The existing socket to be wrapped to create an SSL
socket.host
- The host to which the connection is established.port
- The port to which the connection is established.autoClose
- Indicates whether the provided socket should be closed
when the created SSL socket is closed.java.io.IOException
- If a problem occurs while creating the socket.@NotNull public java.lang.String[] getDefaultCipherSuites()
getDefaultCipherSuites
in class javax.net.ssl.SSLSocketFactory
@NotNull public java.lang.String[] getSupportedCipherSuites()
getSupportedCipherSuites
in class javax.net.ssl.SSLSocketFactory