to top
Android APIs
public abstract class

SSLSocketFactory

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

Class Overview

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.
synchronized 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.
[Expand]
Inherited Methods
From class javax.net.SocketFactory
From class java.lang.Object

Public Constructors

public SSLSocketFactory ()

Added in API level 1

Creates a new SSLSocketFactory.

Public Methods

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

Added in API level 1

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

Parameters
s the socket.
host 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.
Returns
  • the creates ssl socket.
Throws
IOException if creating the socket fails.
UnknownHostException if the host is unknown.

public static synchronized SocketFactory getDefault ()

Added in API level 1

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

Returns
  • the default ssl socket factory instance.

public abstract String[] getDefaultCipherSuites ()

Added in API level 1

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

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

public abstract String[] getSupportedCipherSuites ()

Added in API level 1

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

Returns
  • the names of the cipher suites that are supported.