org.apache.tomcat.util.net.puretls

Class PureTLSSocketFactory

Implemented Interfaces:
Cloneable

public class PureTLSSocketFactory
extends ServerSocketFactory

SSL server socket factory--wraps PureTLS

Author:
Eric Rescorla some sections of this file cribbed from SSLSocketFactory (the JSSE socket factory)

Field Summary

Fields inherited from class org.apache.tomcat.util.net.ServerSocketFactory

attributes

Constructor Summary

PureTLSSocketFactory()
Constructor is used only by subclasses.

Method Summary

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.

Methods inherited from class org.apache.tomcat.util.net.ServerSocketFactory

acceptSocket, createSocket, createSocket, createSocket, getDefault, handshake, initSocket, setAttribute

Constructor Details

PureTLSSocketFactory

public PureTLSSocketFactory()
Constructor is used only by subclasses.

Method Details

acceptSocket

public Socket acceptSocket(ServerSocket socket)
            throws IOException
Wrapper function for accept(). This allows us to trap and translate exceptions if necessary
Overrides:
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.
Overrides:
createSocket in interface ServerSocketFactory

Parameters:
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.
Overrides:
createSocket in interface ServerSocketFactory

Parameters:
port - the port to listen to
backlog - 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.
Overrides:
createSocket in interface ServerSocketFactory

Parameters:
port - the port to listen to
backlog - how many connections are queued
ifAddress - the network interface address to use


handshake

public void handshake(Socket sock)
            throws IOException
Extra function to initiate the handshake. Sometimes necessary for SSL
Overrides:
handshake in interface ServerSocketFactory


Copyright B) 2000-2003 Apache Software Foundation. All Rights Reserved.