|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectde.upb.swtpra05.group03.shuttle.PluginMessenger
single class to send infos to the plugin
| Field Summary | |
private AccountingInterface |
accounting
The accounting |
private ShuttleControlInterface |
agent
No comment provided by developer, please add a comment to improve documentation. |
private int |
currentTime
|
private ExecutionInterface |
execution
The execution |
private AccountLinkedList |
expenses
List of maximal 4 objects describing an expense, e.g. |
private AccountLinkedList |
income
List of maximal 4 objects describing an income, e.g. |
private boolean |
isWorking
|
private MarginControllerInterface |
marginController
The margin controller |
(package private) java.util.HashMap |
namesMap
A HashMap with a relation from StationID (as an int) to the corresponding StationName (as a string) |
private OrderContainerInterface |
orderContainer
The order container |
private PeriodicalWakeUpControlInterface |
periodical
The periodical wake up control |
(package private) PluginGameConstants |
pGC
No comment provided by developer, please add a comment to improve documentation. |
(package private) RoutingData |
rD
No comment provided by developer, please add a comment to improve documentation. |
(package private) ShuttleCompanyControlData |
sccD
|
(package private) ShuttleStrategyData |
sD
No comment provided by developer, please add a comment to improve documentation. |
private int |
startTime
|
private int |
startWorkingTime
|
private TaskPlanInterface |
taskPlan
The taskplan |
private static java.lang.Integer |
WAKE_UP_FREQUENCY
The status message frequency |
private int |
workingTime
|
| Constructor Summary | |
PluginMessenger()
Constructor |
|
| Method Summary | |
private java.lang.String |
constructPickabackString()
Used to construct and save a PickabackString if one or more things changes, otherwise returns the already build and saved PickabackString. |
private void |
gameConstants(de.upb.swtpra.kernel.message.GameConstantsMessage msg)
Sets some constant variables which are used by the plugin |
void |
init(ModuleContainerInterface container)
Initializes this module. |
void |
masterShuttleChanged(de.upb.swtpra.kernel.id.ID masterShuttle)
Informs the plugin that the master shuttle changed. |
private void |
moneyTransferred(de.upb.swtpra.kernel.message.MoneyTransferredMessage msg)
Description of the Method |
void |
newMessageReceived(de.upb.swtpra.kernel.message.Message msg)
Description of the Method |
private void |
paidPenalty(de.upb.swtpra.kernel.message.PaidPenaltyMessage msg)
If the PluginMessenger receives a PaidPenaltyMessage this method is called. |
private RoutingData |
parseAndConstructRoutingData()
Parses the current TaskPlan and generates a RoutingData object. |
private void |
parseTopology(de.upb.swtpra.kernel.TopologyData td)
Called when PluginMessenger receives a Topology. |
void |
repairShuttle(int value)
Informs the plugin that the shuttle repaired |
void |
send()
A call of this method will collect all data the plugin needs, converts it into a string and sends it to the plugin using a ShuttleAgentStatusMessage |
private void |
setMaximumLoad(int newMaximumLoad)
Sets the maximumLoad attribute of the PluginMessenger object |
private void |
setMaximumStretch(int newMaximumStretch)
Sets the maximumStretch attribute of the PluginMessenger object |
void |
shuttlePaidPenalty(int orderID,
int penalty)
|
private void |
wakeUpCall(de.upb.swtpra.kernel.message.WakeUpCallMessage msg)
Handles received WakeUpCallMessages which are used to remind us to send ShuttleAgentStatusMessages. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
private AccountLinkedList expenses
private AccountLinkedList income
private ShuttleControlInterface agent
private ExecutionInterface execution
private MarginControllerInterface marginController
private AccountingInterface accounting
private OrderContainerInterface orderContainer
private TaskPlanInterface taskPlan
private PeriodicalWakeUpControlInterface periodical
PluginGameConstants pGC
ShuttleStrategyData sD
ShuttleCompanyControlData sccD
private static final java.lang.Integer WAKE_UP_FREQUENCY
private int startTime
private int currentTime
private int startWorkingTime
private int workingTime
private boolean isWorking
RoutingData rD
java.util.HashMap namesMap
| Constructor Detail |
public PluginMessenger()
| Method Detail |
public void init(ModuleContainerInterface container)
Module
init in interface Modulecontainer - The module manager which contain all modulespublic void masterShuttleChanged(de.upb.swtpra.kernel.id.ID masterShuttle)
PluginMessengerInterface
masterShuttleChanged in interface PluginMessengerInterfacemasterShuttle - The new master shuttle idprivate void setMaximumStretch(int newMaximumStretch)
newMaximumStretch - The new maximumStretch valueprivate void setMaximumLoad(int newMaximumLoad)
newMaximumLoad - The new maximumLoad valueprivate java.lang.String constructPickabackString()
private void parseTopology(de.upb.swtpra.kernel.TopologyData td)
td - Description of the Parameterprivate RoutingData parseAndConstructRoutingData()
public void send()
PluginMessengerInterface
send in interface PluginMessengerInterfaceprivate void moneyTransferred(de.upb.swtpra.kernel.message.MoneyTransferredMessage msg)
msg - Description of the Parameterpublic void repairShuttle(int value)
PluginMessengerInterface
repairShuttle in interface PluginMessengerInterfacevalue - repair costs
public void shuttlePaidPenalty(int orderID,
int penalty)
public void newMessageReceived(de.upb.swtpra.kernel.message.Message msg)
newMessageReceived in interface ShuttleModulemsg - Description of the Parameterprivate void wakeUpCall(de.upb.swtpra.kernel.message.WakeUpCallMessage msg)
msg - The received WakeUpCallMessageprivate void gameConstants(de.upb.swtpra.kernel.message.GameConstantsMessage msg)
msg - The received GameConstantsMessageprivate void paidPenalty(de.upb.swtpra.kernel.message.PaidPenaltyMessage msg)
msg - The PaidPenaltyMessage
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||