org.cougaar.pizza.plugin
Class KitchenPrototypePlugin

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.KitchenPrototypePlugin
All Implemented Interfaces:
org.cougaar.core.blackboard.BlackboardClient, org.cougaar.core.component.Component, org.cougaar.util.GenericStateModel, org.cougaar.core.plugin.PluginBase

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

This Plugin creates and publishes the Pizza Provider Kitchen Asset object which identifies what kind of pizza a provider's kitchen can make. This plugin does not require any inputs, it simply creates and registers the prototype and then publishes the kitchen asset instances. Note that this plugin will only run once since there are no inputs(subscriptions) to cause it to run.


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
KitchenPrototypePlugin()
           
 
Method Summary
protected  void execute()
          No subscriptions to process, so this method does nothing.
 void load()
          Get the plugin parameters and our planning factory when our component is loaded.
 void setDomainService(org.cougaar.core.service.DomainService aDomainService)
          Used by the binding utility through introspection to set my DomainService Services that are required for plugin usage should be set through reflection instead of explicitly getting each service from your ServiceBroker in the load method.
 void setPrototypeRegistryService(org.cougaar.planning.service.PrototypeRegistryService aPrototypeRegistryService)
          Used by the binding utility through introspection to set my PrototypeRegistryService
protected  void setupSubscriptions()
          Generally used to initalize plugin subscriptions.
 
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

KitchenPrototypePlugin

public KitchenPrototypePlugin()
Method Detail

setDomainService

public void setDomainService(org.cougaar.core.service.DomainService aDomainService)
Used by the binding utility through introspection to set my DomainService Services that are required for plugin usage should be set through reflection instead of explicitly getting each service from your ServiceBroker in the load method. The setter methods are called after the component is constructed but before the state methods such as initialize, load, setupSubscriptions, etc. If the service is not available at that time the component will be unloaded.


setPrototypeRegistryService

public void setPrototypeRegistryService(org.cougaar.planning.service.PrototypeRegistryService aPrototypeRegistryService)
Used by the binding utility through introspection to set my PrototypeRegistryService


load

public void load()
Get the plugin parameters and our planning factory when our component is loaded. If we want additional services that are not required for the plugin, we should get them in load. However, if the component gets a service in load, it should override the unload() method and release the services.


setupSubscriptions

protected void setupSubscriptions()
Generally used to initalize plugin subscriptions. But in this case, we will use it to create our Kitchen assets since we have no subscriptions and we want to publish the assets as soon as we can.


execute

protected void execute()
No subscriptions to process, so this method does nothing.