com.darwinsys.net
Interface StreamServerHandlerFactory


public interface StreamServerHandlerFactory

This interface is used by the StreamServer to get a protocol handler;


Method Summary
 StreamServerHandler getHandler(java.net.ServerSocket serverSock, java.net.Socket clientSocket)
          The server will call this when each new request arrives.
 

Method Detail

getHandler

StreamServerHandler getHandler(java.net.ServerSocket serverSock,
                               java.net.Socket clientSocket)
The server will call this when each new request arrives. This will normally instantiate and return a protocol-specific handler, but is allowed to share instance(s) if they are thread-safe.

Parameters:
serverSock - The server socket, so the factory can tell which port number is in use and infer the protocol if necessary
clientSocket - The connected client socket, so the factory can make any necessary inferences about this client.
Returns:
The handler for this client connection.


Copyright © 1996-2004 Ian F. Darwin. See license.html for usage license.