org.w3c.jigsaw.http
Interface ClientFactory

All Known Implementing Classes:
MuxClientFactory, SocketClientFactory, SSLSocketClientFactory

public interface ClientFactory


Method Summary
 java.net.ServerSocket createServerSocket()
          Create the server socket for this client factory.
 void handleConnection(java.net.Socket socket)
          Handle the given, new connection.
 void initialize(httpd server)
          Initialize that client factory.
 void shutdown(boolean force)
          Shutdown this client factory.
 

Method Detail

shutdown

void shutdown(boolean force)
Shutdown this client factory.

Parameters:
force - If true, force the shutdown, and stop all operations in progress.

handleConnection

void handleConnection(java.net.Socket socket)
Handle the given, new connection.

Parameters:
socket - The newly accepted connection.

initialize

void initialize(httpd server)
Initialize that client factory. Initialize this new client factory, and create the server socket (ie the socket that will be used to accept new connections.

Parameters:
server - The httpd instance to be used as the context for this client factory.

createServerSocket

java.net.ServerSocket createServerSocket()
                                         throws java.io.IOException
Create the server socket for this client factory. This method is always called after the initialize method of the client factory is done.

Returns:
A server socket instance.
Throws:
java.io.IOException - If some IO error occurs while creating the server socket.