org.cougaar.tutorial.booksonline.warehouse
Class WarehouseAllocatorPlugin

java.lang.Object
  extended byorg.cougaar.util.GenericStateModelAdapter
      extended byorg.cougaar.core.blackboard.BlackboardClientComponent
          extended byorg.cougaar.core.plugin.ComponentPlugin
              extended byorg.cougaar.tutorial.booksonline.common.BOLComponentPlugin
                  extended byorg.cougaar.tutorial.booksonline.warehouse.WarehouseAllocatorPlugin
All Implemented Interfaces:
org.cougaar.core.blackboard.BlackboardClient, org.cougaar.core.component.Component, org.cougaar.util.GenericStateModel, org.cougaar.core.plugin.PluginBase

public class WarehouseAllocatorPlugin
extends BOLComponentPlugin

WarehouseAllocatorPlugin allocates books currently in inventory to a packer to pack and decrements the inventory. If not enough inventory, will allocate as much from inventory as possible, then request a drop shipment to the customer directly from the publisher

Version:
$Revision: 1.2 $
Author:
ttschampel

Nested Class Summary
 
Nested classes inherited from class org.cougaar.tutorial.booksonline.common.BOLComponentPlugin
BOLComponentPlugin.PluginAlarm
 
Nested classes inherited from class org.cougaar.core.blackboard.BlackboardClient
org.cougaar.core.blackboard.BlackboardClient.Local
 
Field Summary
static double packerTime
          Time for packer to pack book
 
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
WarehouseAllocatorPlugin()
           
 
Method Summary
 void execute()
          Process Subscriptions
 void load()
          Load componet, get DatbaseService and PrototypeRegistryService
 void setupSubscriptions()
          Setup subscriptions to tasks from warehouse to pack books
 
Methods inherited from class org.cougaar.tutorial.booksonline.common.BOLComponentPlugin
getDomainService, setDomainService, setLoggingService, setUIDService, wakeAfter
 
Methods inherited from class org.cougaar.core.blackboard.BlackboardClientComponent
currentTimeMillis, getBlackboardClientName, getParameter, getParameters, halt, initialize, resume, setAgentIdentificationService, setAlarmService, setBindingSite, setBlackboardService, setParameter, setSchedulerService, start, stop, suspend, toString, unload
 
Methods inherited from class org.cougaar.util.GenericStateModelAdapter
getModelState
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.cougaar.util.GenericStateModel
getModelState, halt, initialize, resume, start, stop, suspend, unload
 

Field Detail

packerTime

public static double packerTime
Time for packer to pack book

Constructor Detail

WarehouseAllocatorPlugin

public WarehouseAllocatorPlugin()
Method Detail

load

public void load()
Load componet, get DatbaseService and PrototypeRegistryService


setupSubscriptions

public void setupSubscriptions()
Setup subscriptions to tasks from warehouse to pack books


execute

public void execute()
Process Subscriptions