|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.omg.CORBA.portable.ObjectImpl
ParkNPark.interfaces._ClientManagerStub
public class _ClientManagerStub
The interface that a single client uses to communicate with its server-side client manager instance
Field Summary | |
---|---|
private static String[] |
__ids
|
Constructor Summary | |
---|---|
_ClientManagerStub()
|
Method Summary | |
---|---|
String[] |
_ids()
|
void |
closeClientManager()
Closes the client manager and frees server resources associated with it, including the client manager's activation in the server's CORBA portable object adapter |
PaddedIntegerSeq |
enterLot(int seq,
int lot)
Moves the client's car into the lot with the given lot number and returns an array of level numbers that have available spaces |
PaddedVoid |
exitLot(int seq)
Removes the client's car from the lot that it is currently in |
PaddedInteger |
getClientID()
Returns the client's ID, which can be used in the client manager factory's getExistingClientManager() method |
PaddedInteger |
getCurrentLevel()
Returns the car's current level number |
PaddedIntegerSeq |
getLots()
Returns an array of valid lot numbers in the system, sorted by the lot number in ascending order |
PaddedInteger |
getMaxLevel()
Returns the top level number of the car's current parking lot |
PaddedInteger |
getMinLevel()
Returns the bottom level number of the car's current parking lot |
PaddedIntegerSeq |
getOtherLotAvailability(int lot)
Returns an array of other lots that have availability, sorted by lot distance such that closer lots are listed first |
PaddedInteger |
moveDownLevel(int seq)
Moves the car from its present level to the level beneath it |
PaddedInteger |
moveUpLevel(int seq)
Moves the car from its present level to the level above it |
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 |
---|
private static String[] __ids
Constructor Detail |
---|
public _ClientManagerStub()
Method Detail |
---|
public PaddedInteger getClientID() throws ServiceUnavailableException
getClientID
in interface ClientManagerOperations
ServiceUnavailableException
- Thrown when the log is closed and the
server is shutting downpublic PaddedIntegerSeq enterLot(int seq, int lot) throws AlreadyInLotException, LotNotFoundException, LotFullException, ServiceUnavailableException
enterLot
in interface ClientManagerOperations
seq
- The latest sequence number of the clientlot
- The lot number to enter
AlreadyInLotException
- Thrown when the client's car is already in a lot
LotNotFoundException
- Thrown if the given lot number is not known to the system
LotFullException
- Thrown if the given lot is full
ServiceUnavailableException
- Thrown if the database cannot be contacted or if some
other reason prevents the car from entering the lotpublic PaddedVoid exitLot(int seq) throws NotInLotException, NotOnExitLevelException, ServiceUnavailableException
exitLot
in interface ClientManagerOperations
seq
- The latest sequence number of the client
NotInLotException
- Thrown if the car is not in a lot
NotOnExitLevelException
- Thrown if the car is in a lot but is not on a permitted
exit level
ServiceUnavailableException
- Thrown if the database cannot be contacted or if some
other reason prevents the car from exiting the lot
[Category: Baseline; Requirement: 7]public PaddedIntegerSeq getOtherLotAvailability(int lot) throws LotNotFoundException, ServiceUnavailableException
getOtherLotAvailability
in interface ClientManagerOperations
lot
- The lot to get lot distances from
LotNotFoundException
- Thrown if the given lot number is not known to the system
ServiceUnavailableException
- Thrown if the database cannot be contacted or if
some other reason prevents the system from discovering the availability of other lotspublic PaddedIntegerSeq getLots() throws ServiceUnavailableException
getLots
in interface ClientManagerOperations
ServiceUnavailableException
- Thrown if the database cannot be contacted or if some
other reason prevents the system from discovering the its defined lotspublic PaddedInteger moveUpLevel(int seq) throws NotInLotException, AtTopLevelException, ServiceUnavailableException
moveUpLevel
in interface ClientManagerOperations
seq
- The latest sequence number of the client
NotInLotException
- Thrown if the car is not in a lot
AtTopLevelException
- Thrown if the car is already on the highest level
ServiceUnavailableException
- Thrown if the database cannot be contacted or if some
other reason prevents the car from moving to the next highest levelpublic PaddedInteger moveDownLevel(int seq) throws NotInLotException, AtBottomLevelException, ServiceUnavailableException
moveDownLevel
in interface ClientManagerOperations
seq
- The latest sequence number of the client
NotInLotException
- Thrown if the car is not in a lot
AtTopLevelException
- Thrown if the car is already on the lowest level
ServiceUnavailableException
- Thrown if the database cannot be contacted or if some other reason prevents the car from moving to the lower level
AtBottomLevelException
public PaddedInteger getCurrentLevel() throws NotInLotException, ServiceUnavailableException
getCurrentLevel
in interface ClientManagerOperations
NotInLotException
- Thrown if the car is not in a lot
ServiceUnavailableException
- Thrown if the database cannot be contacted or if some
other reason prevents the system from returning the car's current levelpublic PaddedInteger getMaxLevel() throws NotInLotException, ServiceUnavailableException
getMaxLevel
in interface ClientManagerOperations
NotInLotException
- Thrown if the car is not in a lot
ServiceUnavailableException
- Thrown if the database cannot be contacted or if some
other reason prevents the system from returning the current lot's highest levelpublic PaddedInteger getMinLevel() throws NotInLotException, ServiceUnavailableException
getMinLevel
in interface ClientManagerOperations
NotInLotException
- Thrown if the car is not in a lot
ServiceUnavailableException
- Thrown if the database cannot be contacted or if some
other reason prevents the system from returning the current lot's lowest levelpublic void closeClientManager() throws ServiceUnavailableException
closeClientManager
in interface ClientManagerOperations
ServiceUnavailableException
- Thrown if the database cannot be contacted or if some
other reason prevents the system from closing the client manager. The client manager remains
open if this exception gets thrownpublic String[] _ids()
_ids
in class ObjectImpl
private void readObject(ObjectInputStream s) throws IOException
IOException
private void writeObject(ObjectOutputStream s) throws IOException
IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |