org.cougaar.pizza.plugin
Class RSVPPlugin

java.lang.Object
  extended byorg.cougaar.util.GenericStateModelAdapter
      extended byorg.cougaar.core.blackboard.BlackboardClientComponent
          extended byorg.cougaar.core.plugin.ComponentPlugin
              extended byorg.cougaar.pizza.plugin.RSVPPlugin
All Implemented Interfaces:
org.cougaar.core.blackboard.BlackboardClient, org.cougaar.core.component.Component, org.cougaar.util.GenericStateModel, org.cougaar.core.plugin.PluginBase

public class RSVPPlugin
extends org.cougaar.core.plugin.ComponentPlugin

Reply to the RSVP relay invitation with the kind of pizza we like.

Makes a new RSVPReply and sets the name of the guest (this agent) and their pizza preference, based on the PGs on the self Entity. Put the RSVPReply on the relay and sends the response back.


Nested Class Summary
 
Nested classes inherited from class org.cougaar.core.blackboard.BlackboardClient
org.cougaar.core.blackboard.BlackboardClient.Local
 
Field Summary
 
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
RSVPPlugin()
           
 
Method Summary
protected  void execute()
          Watch for incoming RSVPRelays.
protected  org.cougaar.planning.ldm.asset.Entity getSelfEntity()
          Do a blackboard query to get the self Entity.
 void load()
          Set up the services we need - logging service
protected  void setupSubscriptions()
          We have one subscription, to the relays (the invitation) we expect to get.
 
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, precycle, requestCycle, resume, setAgentIdentificationService, setAlarmService, setBindingSite, setBlackboardService, setParameter, 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, resume, start, stop, suspend, unload
 

Constructor Detail

RSVPPlugin

public RSVPPlugin()
Method Detail

load

public void load()
Set up the services we need - logging service


setupSubscriptions

protected void setupSubscriptions()
We have one subscription, to the relays (the invitation) we expect to get.


execute

protected void execute()
Watch for incoming RSVPRelays. Then search our local Entity's topping PGs, and set that preference on a response to the relay.


getSelfEntity

protected org.cougaar.planning.ldm.asset.Entity getSelfEntity()
Do a blackboard query to get the self Entity. Looks for entities that have the same item id as my agent id.

Returns:
self Entity, null if not found