|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectde.upb.swtpra05.group03.shuttle.ActivityController
Controls the deactivation and reactivation of one shuttle by the company control.
| Field Summary | |
private ShuttleControlInterface |
agent
The shuttle control |
private java.util.HashSet |
deactivatedShuttleList
deactivatedShuttleList holds the deactivated Shuttles |
private static java.util.logging.Logger |
log
Logger for debugging |
| Constructor Summary | |
ActivityController()
Constructor |
|
| Method Summary | |
boolean |
getShuttleActiveStatus(de.upb.swtpra.kernel.id.ID shuttleID)
Returns false if the Shuttle is set to be deactive from the CompanyControl |
void |
init(ModuleContainerInterface container)
Initializes this module. |
boolean |
isActive()
Returns if the shuttle is active or deactivated by company control. |
void |
newMessageReceived(de.upb.swtpra.kernel.message.Message msg)
React on the received message of the shuttle or not. |
private void |
setShuttleActiveStatus(int shuttleID,
boolean shuttleActivity)
This method keeps the deactivatedShuttleList up to date |
private void |
setShuttleActivity(SetActivityOfShuttleMessage msg)
Sets the shuttle activity. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
private static final java.util.logging.Logger log
private ShuttleControlInterface agent
private java.util.HashSet deactivatedShuttleList
deactivatedShuttleList holds the deactivated Shuttles
| Constructor Detail |
public ActivityController()
| Method Detail |
public void init(ModuleContainerInterface container)
Module
init in interface Modulecontainer - The module manager which contain all modulespublic void newMessageReceived(de.upb.swtpra.kernel.message.Message msg)
ShuttleModule
newMessageReceived in interface ShuttleModulemsg - The received message of the shuttleprivate void setShuttleActivity(SetActivityOfShuttleMessage msg)
msg - The SetActivityOfShuttleMessage
private void setShuttleActiveStatus(int shuttleID,
boolean shuttleActivity)
deactivatedShuttleList up to date
shuttleID - shuttle idshuttleActivity - shuttle activity statuspublic boolean getShuttleActiveStatus(de.upb.swtpra.kernel.id.ID shuttleID)
shuttleID - shuttle id
public boolean isActive()
ActivityControllerInterface
isActive in interface ActivityControllerInterface
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||