org.apache.tomcat.util.net.puretls
Class PureTLSSocketFactory
- Cloneable
public class PureTLSSocketFactory
SSL server socket factory--wraps PureTLS
- Eric Rescorla
some sections of this file cribbed from SSLSocketFactory
(the JSSE socket factory)
Socket | acceptSocket(ServerSocket socket) - Wrapper function for accept().
|
ServerSocket | createSocket(int port) - Returns a server socket which uses all network interfaces on
the host, and is bound to a the specified port.
|
ServerSocket | createSocket(int port, int backlog) - Returns a server socket which uses all network interfaces on
the host, is bound to a the specified port, and uses the
specified connection backlog.
|
ServerSocket | createSocket(int port, int backlog, InetAddress ifAddress) - Returns a server socket which uses only the specified network
interface on the local host, is bound to a the specified port,
and uses the specified connection backlog.
|
void | handshake(Socket sock) - Extra function to initiate the handshake.
|
PureTLSSocketFactory
public PureTLSSocketFactory()
Constructor is used only by subclasses.
acceptSocket
public Socket acceptSocket(ServerSocket socket)
throws IOException
Wrapper function for accept(). This allows us to trap and
translate exceptions if necessary
- acceptSocket in interface ServerSocketFactory
createSocket
public ServerSocket createSocket(int port)
throws IOException
Returns a server socket which uses all network interfaces on
the host, and is bound to a the specified port. The socket is
configured with the socket options (such as accept timeout)
given to this factory.
- createSocket in interface ServerSocketFactory
port
- the port to listen to
createSocket
public ServerSocket createSocket(int port,
int backlog)
throws IOException
Returns a server socket which uses all network interfaces on
the host, is bound to a the specified port, and uses the
specified connection backlog. The socket is configured with
the socket options (such as accept timeout) given to this factory.
- createSocket in interface ServerSocketFactory
port
- the port to listen tobacklog
- how many connections are queued
createSocket
public ServerSocket createSocket(int port,
int backlog,
InetAddress ifAddress)
throws IOException
Returns a server socket which uses only the specified network
interface on the local host, is bound to a the specified port,
and uses the specified connection backlog. The socket is configured
with the socket options (such as accept timeout) given to this factory.
- createSocket in interface ServerSocketFactory
port
- the port to listen tobacklog
- how many connections are queuedifAddress
- the network interface address to use
handshake
public void handshake(Socket sock)
throws IOException
Extra function to initiate the handshake. Sometimes necessary
for SSL
- handshake in interface ServerSocketFactory
Copyright B) 2000-2003 Apache Software Foundation. All Rights Reserved.