|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.cougaar.util.GenericStateModelAdapter
org.cougaar.core.blackboard.BlackboardClientComponent
org.cougaar.core.plugin.ComponentPlugin
org.cougaar.pizza.plugin.InvitePlugin
Sends a simple relay invitation to all "FriendsOfMark" (members of the community), whose responses are automatically collected in the PizzaPreferences object.
Waits for a set amount of time, WAIT_FOR_RSVP_DURATION, until it publishes the pizza preference list to the blackboard. While it's waiting, replies come back from invitees and update the PizzaPreferences object in memory.It must wait because people may take a while to join the FriendsOfMark community, and the PlaceOrderPlugin will place the orders as soon as the PizzaPreferences object is published.
An alternate way to do this instead of an alarm would be to tell this Plugin in advance how many people to expect, or allow it to publishChange the PizzaPreferences object.
PizzaPreferences,
PlaceOrderPlugin| Nested Class Summary |
| Nested classes inherited from class org.cougaar.core.blackboard.BlackboardClient |
org.cougaar.core.blackboard.BlackboardClient.Local |
| Field Summary | |
protected PizzaPreferences |
pizzaPreferences
my list of pizza preferences generated from RSVPs |
protected boolean |
publishedPreferences
Have we published preferences |
protected long |
waitForRSVPDuration
How long to wait before publish preferences |
| Fields inherited from class org.cougaar.core.blackboard.BlackboardClientComponent |
agentId, agentIdentificationService, alarmService, blackboard, blackboardClientName |
| Fields inherited from interface org.cougaar.core.plugin.PluginBase |
INSERTION_POINT |
| Fields inherited from interface org.cougaar.util.GenericStateModel |
ACTIVE, IDLE, LOADED, UNINITIALIZED, UNLOADED |
| Fields inherited from interface org.cougaar.core.blackboard.BlackboardClient |
current |
| Constructor Summary | |
InvitePlugin()
|
|
| Method Summary | |
protected void |
checkTimer()
If the timer has expired, assume all the members of the community have joined, gotten the ABA targeted RSVP Relay, and replied. |
protected void |
execute()
Onc we have the self org, publish the invite RSVPRelay if we haven't yet. |
protected org.cougaar.planning.ldm.asset.Entity |
getSelfEntity()
Returns the Entity representing the agent. |
protected long |
getTimerExpirationTime()
When will (has) the timer expire(d)? |
protected long |
getWaitParameter()
Looks for argument to plugin like: "WAIT_FOR_RSVP_DURATION:60000". |
protected void |
publishRelay()
Create a PizzaPreferences object to collect local results, and publish my RSVP relay inviting people to the party. |
void |
setLoggingService(org.cougaar.core.service.LoggingService log)
|
void |
setParameter(java.lang.Object o)
"setParameter" is only called if a plugin has parameters |
void |
setUIDService(org.cougaar.core.service.UIDService uids)
|
protected void |
setupSubscriptions()
We have one subscription, to the relays (the invitation) we produce. |
protected void |
startTimer(long delay)
Schedule a update wakeup after some interval of time |
protected boolean |
timerExpired()
Test if the timer has expired. |
| Methods inherited from class org.cougaar.core.plugin.ComponentPlugin |
getConfigFinder |
| Methods inherited from class org.cougaar.core.blackboard.BlackboardClientComponent |
currentTimeMillis, cycle, getAgentIdentifier, getAlarmService, getBindingSite, getBlackboardClientName, getBlackboardService, getMessageAddress, getParameter, getParameters, getServiceBroker, halt, load, precycle, requestCycle, resume, setAgentIdentificationService, setAlarmService, setBindingSite, setBlackboardService, setSchedulerService, setServiceBroker, setSuicideService, shouldExecute, start, stop, suspend, toString, unload, wasAwakened |
| Methods inherited from class org.cougaar.util.GenericStateModelAdapter |
getModelState, initialize, transitState |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface org.cougaar.util.GenericStateModel |
getModelState, halt, initialize, load, resume, start, stop, suspend, unload |
| Field Detail |
protected PizzaPreferences pizzaPreferences
protected long waitForRSVPDuration
protected boolean publishedPreferences
| Constructor Detail |
public InvitePlugin()
| Method Detail |
public void setParameter(java.lang.Object o)
public void setLoggingService(org.cougaar.core.service.LoggingService log)
public void setUIDService(org.cougaar.core.service.UIDService uids)
protected long getWaitParameter()
For example :WAIT_FOR_RSVP_DURATION:60000
protected void setupSubscriptions()
protected void execute()
protected void publishRelay()
protected org.cougaar.planning.ldm.asset.Entity getSelfEntity()
protected void checkTimer()
protected void startTimer(long delay)
delay - how long to delay before the timer expires.protected boolean timerExpired()
protected long getTimerExpirationTime()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||