|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectde.upb.swtpra05.group03.shuttle.StrategyControl
Controls the strategy by providing the information which shuttle is the master shuttle.
| Field Summary | |
protected ShuttleControlInterface |
agent
The shuttle control |
protected CompanyInterface |
company
The company |
private static java.util.logging.Logger |
log
Logger for debugging |
protected de.upb.swtpra.kernel.id.ID |
masterID
id of the current master shuttle |
protected PluginMessengerInterface |
plugin
The plugin |
| Fields inherited from interface de.upb.swtpra05.group03.shuttle.StrategyControlInterface |
MASTER_STRATEGY |
| Constructor Summary | |
StrategyControl()
Constructor |
|
| Method Summary | |
de.upb.swtpra.kernel.id.ID |
getMasterShuttleID()
Returns the master shuttle id. |
int |
getStrategy()
Returns the current strategy. |
void |
init(ModuleContainerInterface manager)
Initializes this module. |
boolean |
isMasterShuttle()
Returns if this shuttle is the master shuttle. |
void |
newMessageReceived(de.upb.swtpra.kernel.message.Message msg)
React on the received message of the shuttle or not. |
protected void |
updateMasterShuttleID()
updates masterID to hold the lowest id of all shuttles |
| 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
protected ShuttleControlInterface agent
protected CompanyInterface company
protected PluginMessengerInterface plugin
protected de.upb.swtpra.kernel.id.ID masterID
| Constructor Detail |
public StrategyControl()
| Method Detail |
public void init(ModuleContainerInterface manager)
Module
init in interface Modulemanager - 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 shuttleprotected void updateMasterShuttleID()
masterID to hold the lowest id of all shuttles
public int getStrategy()
StrategyControlInterface
getStrategy in interface StrategyControlInterfacepublic de.upb.swtpra.kernel.id.ID getMasterShuttleID()
StrategyControlInterface
getMasterShuttleID in interface StrategyControlInterfacepublic boolean isMasterShuttle()
StrategyControlInterface
isMasterShuttle in interface StrategyControlInterface
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||