public class OpenSSLSocketFactoryImpl extends SSLSocketFactory
| Constructor and Description |
|---|
OpenSSLSocketFactoryImpl() |
OpenSSLSocketFactoryImpl(SSLParametersImpl sslParameters) |
| Modifier and Type | Method and Description |
|---|---|
Socket |
createSocket()
Creates a new socket which is not connected to any remote host.
|
Socket |
createSocket(InetAddress address,
int port)
Creates a new socket which is connected to the remote host specified by
the InetAddress
host. |
Socket |
createSocket(InetAddress address,
int port,
InetAddress localAddress,
int localPort)
Creates a new socket which is connected to the remote host specified by
the InetAddress
address. |
Socket |
createSocket(Socket s,
String hostname,
int port,
boolean autoClose)
Creates an
SSLSocket over the specified socket that is connected
to the specified host at the specified port. |
Socket |
createSocket(String hostname,
int port)
Creates a new socket which is connected to the remote host specified by
the parameters
host and port. |
Socket |
createSocket(String hostname,
int port,
InetAddress localHost,
int localPort)
Creates a new socket which is connected to the remote host specified by
the parameters
host and port. |
String[] |
getDefaultCipherSuites()
Returns the names of the cipher suites that are enabled by default.
|
String[] |
getSupportedCipherSuites()
Returns the names of the cipher suites that are supported and could be
enabled for an SSL connection.
|
getDefaultsetDefaultpublic OpenSSLSocketFactoryImpl()
public OpenSSLSocketFactoryImpl(SSLParametersImpl sslParameters)
public String[] getDefaultCipherSuites()
SSLSocketFactorygetDefaultCipherSuites in class SSLSocketFactorypublic String[] getSupportedCipherSuites()
SSLSocketFactorygetSupportedCipherSuites in class SSLSocketFactorypublic Socket createSocket() throws IOException
SocketFactorySocketException is thrown.createSocket in class SocketFactoryIOException - if an error occurs while creating a new socket.public Socket createSocket(String hostname, int port) throws IOException, UnknownHostException
SocketFactoryhost and port. The socket is bound to any
available local address and port.createSocket in class SocketFactoryhostname - the remote host address the socket has to be connected to.port - the port number of the remote host at which the socket is
connected.IOException - if an error occurs while creating a new socket.UnknownHostException - if the specified host is unknown or the IP address could not
be resolved.public Socket createSocket(String hostname, int port, InetAddress localHost, int localPort) throws IOException, UnknownHostException
SocketFactoryhost and port. The socket is bound to the
local network interface specified by the InetAddress localHost on
port localPort.createSocket in class SocketFactoryhostname - the remote host address the socket has to be connected to.port - the port number of the remote host at which the socket is
connected.localHost - the local host address the socket is bound to.localPort - the port number of the local host at which the socket is
bound.IOException - if an error occurs while creating a new socket.UnknownHostException - if the specified host is unknown or the IP address could not
be resolved.public Socket createSocket(InetAddress address, int port) throws IOException
SocketFactoryhost. The socket is bound to any available local
address and port.createSocket in class SocketFactoryaddress - the host address the socket has to be connected to.port - the port number of the remote host at which the socket is
connected.IOException - if an error occurs while creating a new socket.public Socket createSocket(InetAddress address, int port, InetAddress localAddress, int localPort) throws IOException
SocketFactoryaddress. The socket is bound to the local network
interface specified by the InetAddress localHost on port localPort.createSocket in class SocketFactoryaddress - the remote host address the socket has to be connected to.port - the port number of the remote host at which the socket is
connected.localAddress - the local host address the socket is bound to.localPort - the port number of the local host at which the socket is
bound.IOException - if an error occurs while creating a new socket.public Socket createSocket(Socket s, String hostname, int port, boolean autoClose) throws IOException
SSLSocketFactorySSLSocket over the specified socket that is connected
to the specified host at the specified port.createSocket in class SSLSocketFactorys - the socket.hostname - the host.port - the port number.autoClose - true if socket s should be closed when the
created socket is closed, false if the socket
s should be left open.IOException - if creating the socket fails.UnknownHostException - if the host is unknown.