ParkNPark.middletier
Class ClientManagerFactoryImpl

java.lang.Object
  extended by org.omg.PortableServer.Servant
      extended by ParkNPark.interfaces.ClientManagerFactoryPOA
          extended by ParkNPark.middletier.ClientManagerFactoryImpl
All Implemented Interfaces:
InvokeHandler, ClientManagerFactoryOperations

public class ClientManagerFactoryImpl
extends ClientManagerFactoryPOA

Creates and manages ClientManager instances for clients


Field Summary
private  int MAX_ATTEMPTS
          Maximum number of attempts at the database
 
Constructor Summary
ClientManagerFactoryImpl()
           
 
Method Summary
 ClientManager getClientManager()
          Creates a new client manager instance for a new client
 ClientManager getExistingClientManager(int clientID)
          Returns the existing client manager instance for an existing client.
 void poke()
          The poke method
 
Methods inherited from class ParkNPark.interfaces.ClientManagerFactoryPOA
_all_interfaces, _invoke, _this, _this
 
Methods inherited from class org.omg.PortableServer.Servant
_default_POA, _get_delegate, _get_interface_def, _is_a, _non_existent, _object_id, _orb, _poa, _set_delegate, _this_object, _this_object
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

MAX_ATTEMPTS

private int MAX_ATTEMPTS
Maximum number of attempts at the database

Constructor Detail

ClientManagerFactoryImpl

public ClientManagerFactoryImpl()
Method Detail

getClientManager

public ClientManager getClientManager()
                               throws ServiceUnavailableException
Creates a new client manager instance for a new client

Returns:
A new client manager instance for a new client
Throws:
ServiceUnavailableException - Thrown if the database cannot be contacted or if some other reason prevents the client manager from being created successfully

getExistingClientManager

public ClientManager getExistingClientManager(int clientID)
                                       throws ServiceUnavailableException,
                                              InvalidClientException
Returns the existing client manager instance for an existing client. A client can call this method with its client ID and last sequence number on any server and will get its client manager instance

Parameters:
clientID - The ID of the client to get the ClientManager of
Returns:
The existing client manager instance for an existing client
Throws:
InvalidClientException - Thrown when the given client ID is not known to the system
ServiceUnavailableException - Thrown if the database cannot be contacted or if some other reason prevents the client manager from being retrieved successfully

poke

public void poke()
          throws ServiceUnavailableException
Description copied from interface: ClientManagerFactoryOperations
The poke method

Throws:
ServiceUnavailableException