ParkNPark.interfaces
Class _ClientManagerFactoryStub

java.lang.Object
  extended by org.omg.CORBA.portable.ObjectImpl
      extended by ParkNPark.interfaces._ClientManagerFactoryStub
All Implemented Interfaces:
Serializable, Object, IDLEntity, ClientManagerFactory, ClientManagerFactoryOperations

public class _ClientManagerFactoryStub
extends ObjectImpl
implements ClientManagerFactory

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

See Also:
Serialized Form

Field Summary
private static String[] __ids
           
 
Constructor Summary
_ClientManagerFactoryStub()
           
 
Method Summary
 String[] _ids()
           
 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
private  void readObject(ObjectInputStream s)
           
private  void writeObject(ObjectOutputStream s)
           
 
Methods inherited from class org.omg.CORBA.portable.ObjectImpl
_create_request, _create_request, _duplicate, _get_delegate, _get_domain_managers, _get_interface_def, _get_policy, _hash, _invoke, _is_a, _is_equivalent, _is_local, _non_existent, _orb, _release, _releaseReply, _request, _request, _servant_postinvoke, _servant_preinvoke, _set_delegate, _set_policy_override, equals, hashCode, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.omg.CORBA.Object
_create_request, _create_request, _duplicate, _get_domain_managers, _get_interface_def, _get_policy, _hash, _is_a, _is_equivalent, _non_existent, _release, _request, _set_policy_override
 

Field Detail

__ids

private static String[] __ids
Constructor Detail

_ClientManagerFactoryStub

public _ClientManagerFactoryStub()
Method Detail

getClientManager

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

Specified by:
getClientManager in interface ClientManagerFactoryOperations
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

public 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

Specified by:
getExistingClientManager in interface ClientManagerFactoryOperations
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

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

Specified by:
poke in interface ClientManagerFactoryOperations
Throws:
ServiceUnavailableException - Thrown when the server's database connection is not working [Category: Dependability; Requirement: 1]

hoseDatabaseConnection

public 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]

Specified by:
hoseDatabaseConnection in interface ClientManagerFactoryOperations

killServer

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

Specified by:
killServer in interface ClientManagerFactoryOperations

exitServer

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

Specified by:
exitServer in interface ClientManagerFactoryOperations

flushLogs

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

Specified by:
flushLogs in interface ClientManagerFactoryOperations

_ids

public String[] _ids()
Specified by:
_ids in class ObjectImpl

readObject

private void readObject(ObjectInputStream s)
                 throws IOException
Throws:
IOException

writeObject

private void writeObject(ObjectOutputStream s)
                  throws IOException
Throws:
IOException