javax.net.ssl
Class SSLServerSocket

java.lang.Object
  |
  +--java.net.ServerSocket
        |
        +--javax.net.ssl.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.

Since:
1.4
See Also:
ServerSocket, SSLSocket

 

Constructor Summary

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

 

Method Summary

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 getEnableSessionCreation()
    Returns true if new SSL sessions may be established by the sockets which are created from this server socket.
abstract  boolean getNeedClientAuth()
    Returns true if client authentication is required on 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 is requested on newly accepted connections.
abstract  void setEnabledCipherSuites(String[] suites)
    Controls which particular SSL cipher suites are enabled for use by accepted connections.
abstract  void setEnabledProtocols(String[] protocols)
    Controls which particular protocols are enabled for use by accepted connections.
abstract  void