Class sun.security.ssl.SSLServerSocket
All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class sun.security.ssl.SSLServerSocket

java.lang.Object
   |
   +----java.net.ServerSocket
           |
           +----sun.security.ssl.SSLServerSocket

public final class SSLServerSocket
extends ServerSocket
This class provides a simple way for servers to support conventional use of the Secure Sockets Layer (SSL). Application code uses an SSLServerSocket exactly like it uses a regular TCP ServerSocket; the difference is that the connections established are secured using SSL.


Notes:

See Also:
SSLOptions, SSLSocket

Constructor Index

 o SSLServerSocket(int, CertChain, Key)
Create an SSL server socket.
 o SSLServerSocket(int, int, CertChain, Key)
Create an SSL server socket.

Method Index

 o accept()
Accept a new SSL connection.
 o finalize()
Safely shuts down this SSL connection.
 o toString()
Provides a brief description of this SSL socket.

Constructors

 o SSLServerSocket
  public SSLServerSocket(int port,
                         CertChain certs,
                         Key priv) throws IOException
Create an SSL server socket. The server will authenticate itself using the cert chain and private key passed in. The connection backlog defaults to fifty connections queued up before the system starts to reject new connection requests.
Parameters:
port - the port on which to listen
certs - a chain of certificates for this server
priv - private key corresponding to chain
 o SSLServerSocket
  public SSLServerSocket(int port,
                         int backlog,
                         CertChain certs,
                         Key priv) throws IOException
Create an SSL server socket. The server will authenticate itself using the cert chain and private key passed in. The maximum connection backlog is assigned as requested.
Parameters:
port - the port on which to listen
backlog - how many connections may be pending before the system should start rejecting new requests
certs - a chain of certificates for this server
priv - private key corresponding to chain

Methods

 o accept
  public Socket accept() throws IOException
Accept a new SSL connection. This server identifies itself with the certificates and private key provided in the constructor.
Overrides:
accept in class ServerSocket
 o toString
  public String toString()
Provides a brief description of this SSL socket.
Overrides:
toString in class ServerSocket
 o finalize
  public void finalize()
Safely shuts down this SSL connection.
Overrides:
finalize in class Object

All Packages  Class Hierarchy  This Package  Previous  Next  Index