Package org.conscrypt
Class SSLSocketFactoryImpl
java.lang.Object
javax.net.SocketFactory
javax.net.ssl.SSLSocketFactory
org.conscrypt.SSLSocketFactoryImpl
public class SSLSocketFactoryImpl extends SSLSocketFactory
Implementation of SSLSocketFactory.
-
Constructor Summary
Constructors Modifier Constructor Description SSLSocketFactoryImpl()Constructor.protectedSSLSocketFactoryImpl(SSLParametersImpl sslParameters)Constructor. -
Method Summary
Modifier and Type Method Description SocketcreateSocket()Creates a new socket which is not connected to any remote host.SocketcreateSocket(String host, int port)Creates a new socket which is connected to the remote host specified by the parametershostandport.SocketcreateSocket(String host, int port, InetAddress localHost, int localPort)Creates a new socket which is connected to the remote host specified by the parametershostandport.SocketcreateSocket(InetAddress host, int port)Creates a new socket which is connected to the remote host specified by the InetAddresshost.SocketcreateSocket(InetAddress address, int port, InetAddress localAddress, int localPort)Creates a new socket which is connected to the remote host specified by the InetAddressaddress.SocketcreateSocket(Socket s, String host, int port, boolean autoClose)Creates anSSLSocketover the specified socket that is connected to the specified host at the specified 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.Methods inherited from class javax.net.ssl.SSLSocketFactory
getDefault
-
Constructor Details
-
SSLSocketFactoryImpl
public SSLSocketFactoryImpl()Constructor. -
SSLSocketFactoryImpl
Constructor.
-
-
Method Details
-
getDefaultCipherSuites
Description copied from class:SSLSocketFactoryReturns the names of the cipher suites that are enabled by default.- Specified by:
getDefaultCipherSuitesin classSSLSocketFactory- Returns:
- the names of the cipher suites that are enabled by default.
- See Also:
SSLSocketFactory.getDefaultCipherSuites()
-
getSupportedCipherSuites
Description copied from class:SSLSocketFactoryReturns the names of the cipher suites that are supported and could be enabled for an SSL connection.- Specified by:
getSupportedCipherSuitesin classSSLSocketFactory- Returns:
- the names of the cipher suites that are supported.
- See Also:
SSLSocketFactory.getSupportedCipherSuites()
-
createSocket
Description copied from class:SSLSocketFactoryCreates anSSLSocketover the specified socket that is connected to the specified host at the specified port.- Specified by:
createSocketin classSSLSocketFactory- Parameters:
s- the socket.host- the host.port- the port number.autoClose-trueif socketsshould be closed when the created socket is closed,falseif the socketsshould be left open.- Returns:
- the creates ssl socket.
- Throws:
IOException- if creating the socket fails.UnknownHostException- if the host is unknown.- See Also:
SSLSocketFactory.createSocket(Socket,String,int,boolean)
-
createSocket
Description copied from class:SocketFactoryCreates a new socket which is not connected to any remote host. This method has to be overridden by a subclass otherwise aSocketExceptionis thrown.- Overrides:
createSocketin classSocketFactory- Returns:
- the created unconnected socket.
- Throws:
IOException- if an error occurs while creating a new socket.- See Also:
SocketFactory.createSocket()
-
createSocket
Description copied from class:SocketFactoryCreates a new socket which is connected to the remote host specified by the parametershostandport. The socket is bound to any available local address and port.- Specified by:
createSocketin classSocketFactory- Parameters:
host- 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.- Returns:
- the created connected socket.
- Throws:
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.- See Also:
SocketFactory.createSocket(String,int)
-
createSocket
public Socket createSocket(String host, int port, InetAddress localHost, int localPort) throws IOException, UnknownHostExceptionDescription copied from class:SocketFactoryCreates a new socket which is connected to the remote host specified by the parametershostandport. The socket is bound to the local network interface specified by the InetAddresslocalHoston portlocalPort.- Specified by:
createSocketin classSocketFactory- Parameters:
host- 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.- Returns:
- the created connected socket.
- Throws:
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.- See Also:
SocketFactory.createSocket(String,int,InetAddress,int)
-
createSocket
Description copied from class:SocketFactoryCreates a new socket which is connected to the remote host specified by the InetAddresshost. The socket is bound to any available local address and port.- Specified by:
createSocketin classSocketFactory- Parameters:
host- the host address the socket has to be connected to.port- the port number of the remote host at which the socket is connected.- Returns:
- the created connected socket.
- Throws:
IOException- if an error occurs while creating a new socket.- See Also:
SocketFactory.createSocket(InetAddress,int)
-
createSocket
public Socket createSocket(InetAddress address, int port, InetAddress localAddress, int localPort) throws IOExceptionDescription copied from class:SocketFactoryCreates a new socket which is connected to the remote host specified by the InetAddressaddress. The socket is bound to the local network interface specified by the InetAddresslocalHoston portlocalPort.- Specified by:
createSocketin classSocketFactory- Parameters:
address- 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.- Returns:
- the created connected socket.
- Throws:
IOException- if an error occurs while creating a new socket.- See Also:
SocketFactory.createSocket(InetAddress,int,InetAddress,int)
-