ParkNPark.interfaces
Interface ClientManagerFactoryOperations

All Known Subinterfaces:
ClientManagerFactory
All Known Implementing Classes:
_ClientManagerFactoryStub, ClientManagerFactoryImpl, ClientManagerFactoryPOA

public interface ClientManagerFactoryOperations

The main interface that the client uses to communicate with the server


Method Summary
 void exitServer()
          Exits the server gracefully [TO TERMINATE THE SERVICE]
 void flushLogs()
          Flushes the server's log files [FOR EXPERIMENTS]
 ClientManager getClientManager(String hostname)
          Creates a new client manager instance for a new client
 ClientManager getExistingClientManager(int clientID, String hostname)
          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 killServer()
          Kills the server [TO TEST FAILURES]
 void poke()
          Pokes the server to see if it is still alive and that it can still communicate with the database
 

Method Detail

getClientManager

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

Parameters:
hostname - The host name of the client
Returns:
A new client manager instance for a new client [Category: Dependability; Requirement: 2
Throws:
ServiceUnavailableException - Thrown if the database cannot be contacted or if some other reason prevents the client manager from being created successfully

getExistingClientManager

ClientManager getExistingClientManager(int clientID,
                                       String hostname)
                                       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 should get its client manager instance

Parameters:
clientID - The ID of the client to get the ClientManager of
hostname - The host name of the client
Returns:
The existing client manager instance for an existing client [Category: Dependability; Requirement: 2]
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

void poke()
          throws ServiceUnavailableException
Pokes the server to see if it is still alive and that it can still communicate with the database

Throws:
ServiceUnavailableException - Thrown when the server's database connection is not working [Category: Dependability; Requirement: 1]

hoseDatabaseConnection

void hoseDatabaseConnection()
Causes the server's database connection to become "hosed," meaning that it will fail to work after this method is called. This is used primarily for fault injection [TO TEST ROBUSTNESS]


killServer

void killServer()
Kills the server [TO TEST FAILURES]


exitServer

void exitServer()
Exits the server gracefully [TO TERMINATE THE SERVICE]


flushLogs

void flushLogs()
Flushes the server's log files [FOR EXPERIMENTS]