SSLServerSocket

public abstract class SSLServerSocket extends ServerSocket

This class extends ServerSockets and provides secure server sockets using protocols such as the Secure Sockets Layer (SSL) or Transport Layer Security (TLS) protocols.

Instances of this class are generally created using a SSLServerSocketFactory. The primary function of SSLServerSockets is to create SSLSockets by accepting connections.

SSLServerSockets contain several pieces of state data which are inherited by the SSLSocket at socket creation. These include the enabled cipher suites and protocols, whether client authentication is necessary, and whether created sockets should begin handshaking in client or server mode. The state inherited by the created SSLSocket can be overriden by calling the appropriate methods.

Protected Constructor Summary

SSLServerSocket()
Used only by subclasses.
SSLServerSocket(int port)
Used only by subclasses.
SSLServerSocket(int port, int backlog)
Used only by subclasses.
SSLServerSocket(int port, int backlog, InetAddress address)
Used only by subclasses.

Public Method Summary

abstract boolean
getEnableSessionCreation()
Returns true if new SSL sessions may be established by the sockets which are created from this server socket.
abstract String[]
getEnabledCipherSuites()
Returns the list of cipher suites which are currently enabled for use by newly accepted connections.
abstract String[]
getEnabledProtocols()
Returns the names of the protocols which are currently enabled for use by the newly accepted connections.
abstract boolean
getNeedClientAuth()
Returns true if client authentication will be required on newly accepted server-mode SSLSockets.
SSLParameters
getSSLParameters()
Returns the SSLParameters in effect for newly accepted connections.
abstract String[]
getSupportedCipherSuites()
Returns the names of the cipher suites which could be enabled for use on an SSL connection.
abstract String[]
getSupportedProtocols()
Returns the names of the protocols which could be enabled for use.
abstract boolean
getUseClientMode()
Returns true if accepted connections will be in SSL client mode.
abstract boolean
getWantClientAuth()
Returns true if client authentication will be requested on newly accepted server-mode connections.
abstract void
setEnableSessionCreation(boolean flag)
Controls whether new SSL sessions may be established by the sockets which are created from this server socket.
abstract void
setEnabledCipherSuites(String[] suites)
Sets the cipher suites enabled for use by accepted connections.
abstract void
setEnabledProtocols(String[] protocols)
Controls which particular protocols are enabled for use by accepted connections.
abstract void
setNeedClientAuth(boolean need)
Controls whether accepted server-mode SSLSockets will be initially configured to require client authentication.
void
setSSLParameters(SSLParameters params)
Applies SSLParameters to newly accepted connections.
abstract void
setUseClientMode(boolean mode)
Controls whether accepted connections are in the (default) SSL server mode, or the SSL client mode.
abstract void
setWantClientAuth(boolean want)
Controls whether accepted server-mode SSLSockets will be initially configured to request client authentication.

Inherited Method Summary