FileDocCategorySizeDatePackage
SSLServerSocket.javaAPI DocAndroid 1.5 API8578Wed May 06 22:41:06 BST 2009javax.net.ssl

SSLServerSocket

public abstract class SSLServerSocket extends ServerSocket
The extension of {@code ServerSocket} which provides secure server sockets based on protocols like SSL, TLS, or others.
since
Android 1.0

Fields Summary
Constructors Summary
protected SSLServerSocket()
Only to be used by subclasses.

Creates a TCP server socket with the default authentication context.

throws
IOException if creating the socket fails.
since
Android 1.0

        super();
    
protected SSLServerSocket(int port)
Only to be used by subclasses.

Creates a TCP server socket on the specified port with the default authentication context. The connection's default backlog size is 50 connections.

param
port the port to listen on.
throws
IOException if creating the socket fails.
since
Android 1.0

        super(port);
    
protected SSLServerSocket(int port, int backlog)
Only to be used by subclasses.

Creates a TCP server socket on the specified port using the specified backlog and the default authentication context.

param
port the port to listen on.
param
backlog the number of pending connections to queue.
throws
IOException if creating the socket fails.
since
Android 1.0

        super(port, backlog);
    
protected SSLServerSocket(int port, int backlog, InetAddress address)
Only to be used by subclasses.

Creates a TCP server socket on the specified port, using the specified backlog, listening on the specified interface, and using the default authentication context.

param
port the port the listen on.
param
backlog the number of pending connections to queue.
param
address the address of the interface to accept connections on.
throws
IOException if creating the socket fails.
since
Android 1.0

        super(port, backlog, address);
    
Methods Summary
public abstract booleangetEnableSessionCreation()
Returns whether new SSL sessions may be established for new connections.

return
{@code true} if new SSL sessions may be established, {@code false} if existing SSL sessions must be reused.
since
Android 1.0

public abstract java.lang.String[]getEnabledCipherSuites()
Returns the names of the enabled cipher suites to be used for new connections.

return
the names of the enabled cipher suites to be used for new connections.
since
Android 1.0

public abstract java.lang.String[]getEnabledProtocols()
Returns the names of the enabled protocols to be used for new connections.

return
the names of the enabled protocols to be used for new connections.
since
Android 1.0

public abstract booleangetNeedClientAuth()
Returns whether server-mode connections will be configured to require client authentication.

return
{@code true} if client authentication is required, {@code false} if no client authentication is needed.
since
Android 1.0

public abstract java.lang.String[]getSupportedCipherSuites()
Returns the names of the supported cipher suites.

return
the names of the supported cipher suites.
since
Android 1.0

public abstract java.lang.String[]getSupportedProtocols()
Returns the names of the supported protocols.

return
the names of the supported protocols.
since
Android 1.0

public abstract booleangetUseClientMode()
Returns whether new connection will act in client mode when handshaking.

return
{@code true} if new connections will act in client mode when handshaking, {@code false} if not.
since
Android 1.0

public abstract booleangetWantClientAuth()
Returns whether server-mode connections will be configured to request client authentication.

return
{@code true} is client authentication will be requested, {@code false} if no client authentication is needed.
since
Android 1.0

public abstract voidsetEnableSessionCreation(boolean flag)
Sets whether new SSL sessions may be established for new connections.

param
flag {@code true} if new SSL sessions may be established, {@code false} if existing SSL sessions must be reused.
since
Android 1.0

public abstract voidsetEnabledCipherSuites(java.lang.String[] suites)
Sets the names of the cipher suites to be enabled for new connections. Only cipher suites returned by {@link #getSupportedCipherSuites()} are allowed.

param
suites the names of the to be enabled cipher suites.
throws
IllegalArgumentException if one of the cipher suite names is not supported.
since
Android 1.0

public abstract voidsetEnabledProtocols(java.lang.String[] protocols)
Sets the names of the protocols to be enabled for new connections. Only protocols returned by {@link #getSupportedProtocols()} are allowed.

param
protocols the names of the to be enabled protocols.
throws
IllegalArgumentException if one of the protocols is not supported.
since
Android 1.0

public abstract voidsetNeedClientAuth(boolean need)
Sets whether server-mode connections will be configured to require client authentication. The client authentication is one of the following:
  • authentication required
  • authentication requested
  • no authentication needed
This method overrides the setting of {@link #setWantClientAuth(boolean)}.

param
need {@code true} if client authentication is required, {@code false} if no authentication is needed.
since
Android 1.0

public abstract voidsetUseClientMode(boolean mode)
Sets whether new connections should act in client mode when handshaking.

param
mode {@code true} if new connections should act in client mode, {@code false} if not.
since
Android 1.0

public abstract voidsetWantClientAuth(boolean want)
Sets whether server-mode connections will be configured to request client authentication. The client authentication is one of the following:
  • authentication required
  • authentication requested
  • no authentication needed
This method overrides the setting of {@link #setNeedClientAuth(boolean)}.

param
want {@code true} if client authentication should be requested, {@code false} if no authentication is needed.
since
Android 1.0