Skip to content

Most visited

Recently visited

navigation
Added in API level 1

SSLSocketFactory

public abstract class SSLSocketFactory
extends SocketFactory

java.lang.Object
   ↳ javax.net.SocketFactory
     ↳ javax.net.ssl.SSLSocketFactory
Known Direct Subclasses


The abstract factory implementation to create SSLSockets.

Summary

Public constructors

SSLSocketFactory()

Creates a new SSLSocketFactory.

Public methods

abstract Socket createSocket(Socket s, String host, int port, boolean autoClose)

Creates an SSLSocket over the specified socket that is connected to the specified host at the specified port.

static SocketFactory getDefault()

Returns the default SSLSocketFactory instance.

abstract String[] getDefaultCipherSuites()

Returns the names of the cipher suites that are enabled by default.

abstract String[] getSupportedCipherSuites()

Returns the names of the cipher suites that are supported and could be enabled for an SSL connection.

Inherited methods

From class javax.net.SocketFactory
From class java.lang.Object

Public constructors

SSLSocketFactory

Added in API level 1
SSLSocketFactory ()

Creates a new SSLSocketFactory.

Public methods

createSocket

Added in API level 1
Socket createSocket (Socket s, 
                String host, 
                int port, 
                boolean autoClose)

Creates an SSLSocket over the specified socket that is connected to the specified host at the specified port.

Parameters
s Socket: the socket.
host String: the host.
port int: the port number.
autoClose boolean: true if socket s should be closed when the created socket is closed, false if the socket s should be left open.
Returns
Socket the creates ssl socket.
Throws
IOException if creating the socket fails.
UnknownHostException if the host is unknown.

getDefault

Added in API level 1
SocketFactory getDefault ()

Returns the default SSLSocketFactory instance. The default is defined by the security property 'ssl.SocketFactory.provider'.

Returns
SocketFactory the default ssl socket factory instance.

getDefaultCipherSuites

Added in API level 1
String[] getDefaultCipherSuites ()

Returns the names of the cipher suites that are enabled by default.

Returns
String[] the names of the cipher suites that are enabled by default.

getSupportedCipherSuites

Added in API level 1
String[] getSupportedCipherSuites ()

Returns the names of the cipher suites that are supported and could be enabled for an SSL connection.

Returns
String[] the names of the cipher suites that are supported.
This site uses cookies to store your preferences for site-specific language and display options.

Hooray!

This class requires API level or higher

This doc is hidden because your selected API level for the documentation is . You can change the documentation API level with the selector above the left navigation.

For more information about specifying the API level your app requires, read Supporting Different Platform Versions.