com.msi.network.server
Class RHFactory

java.lang.Object
  extended bycom.msi.network.server.RHFactory

public class RHFactory
extends java.lang.Object

This is a gateway class that allows the application to register a capability for a requesthandler object to be constructed and for a requesthandler based server to create these application requesthandlers as needed.

Version:
1.0
Author:
Ken Thompson

Field Summary
private static java.util.Hashtable builders
           
 
Constructor Summary
RHFactory()
           
 
Method Summary
static RequestHandler getRequestHandler(int port)
          The server uses this method to create a the requestHandler needed to service client requests on the specified port.
static void registerBuilder(RHBuilder b, int port)
          The application uses this method to register its requesthandler builders with the factory.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

builders

private static java.util.Hashtable builders
Constructor Detail

RHFactory

public RHFactory()
Method Detail

registerBuilder

public static void registerBuilder(RHBuilder b,
                                   int port)
The application uses this method to register its requesthandler builders with the factory.

Parameters:
b - the requestHandler builder.
port - the port identifier for connections handled by requestHandlers created by this builder.

getRequestHandler

public static RequestHandler getRequestHandler(int port)
The server uses this method to create a the requestHandler needed to service client requests on the specified port.

Parameters:
port - selects which request handler to create.
Returns:
the appropriate requestHandler or null if a requestHandler cannot be created.


Copyright © 2001-2002 MileStone Solutions, Inc. All Rights Reserved.