|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.omg.PortableServer.Servant
ParkNPark.interfaces.ClientManagerFactoryPOA
ParkNPark.middletier.ClientManagerFactoryImpl
public class ClientManagerFactoryImpl
Creates and manages ClientManager instances for clients
| Field Summary | |
|---|---|
protected DatabaseManager |
databaseManager
Our database manager instance |
protected Logger |
logger
Logger instance |
protected static int |
MAX_ATTEMPTS
Maximum number of attempts when trying to execute commends on database |
protected int |
replySize
Size of reply |
| Constructor Summary | |
|---|---|
ClientManagerFactoryImpl(Logger logger,
int replySize)
Creates a new ClientManagerFactoryImpl instance |
|
| Method Summary | |
|---|---|
ClientManager |
getClientManager(String clientHostname)
Creates a new client manager instance for a new client |
ClientManager |
getExistingClientManager(int clientID,
String clientHostname)
Returns the existing client manager instance for an existing client. |
void |
hoseDatabaseConnection()
Causes the server's database connection to become "hosed," meaning that it will fail to work after this method is called. |
void |
poke()
Pokes the server to see if it is still alive and that it can still communicate with the database |
| 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 |
|---|
protected static final int MAX_ATTEMPTS
protected DatabaseManager databaseManager
protected int replySize
protected Logger logger
| Constructor Detail |
|---|
public ClientManagerFactoryImpl(Logger logger,
int replySize)
logger - The Logger to write performance data toreplySize - | Method Detail |
|---|
public ClientManager getClientManager(String clientHostname)
throws ServiceUnavailableException
clientHostname - The host name of the client
ServiceUnavailableException - Thrown if the database cannot be
contacted or if some other reason prevents the client manager from
being created successfully
public ClientManager getExistingClientManager(int clientID,
String clientHostname)
throws ServiceUnavailableException,
InvalidClientException
clientID - The ID of the client to get the ClientManager ofclientHostname - The host name of the client
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
public void poke()
throws ServiceUnavailableException
ServiceUnavailableException - Thrown when the server's database
connection is not workingpublic void hoseDatabaseConnection()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||