| org.cougaar.planning.plugin.legacy.SimplePlugin org.cougaar.logistics.plugin.packer.GenericPlugin
All known Subclasses: org.cougaar.logistics.plugin.packer.ALPacker,
GenericPlugin | abstract public class GenericPlugin extends SimplePlugin (Code) | | Main class for the generic plugin.
real work is done by processAddTask, processChangeTask, processRemoveTasks
these methods called at the end of execute().
The Generic Plugin should have three subscriptions:
- To all the PlanElements it has created. Changes to these
should be handled by updating their AllocationResults
- To tasks based on the predicate defined by getTaskPredicate.
- A subscription to all its assets, used to find itself.
|
DEFAULT_LOGGING_LEVEL | final public static int DEFAULT_LOGGING_LEVEL(Code) | | |
INTERNAL | public static String INTERNAL(Code) | | This new Preposition is used to tag tasks that are created through
Packing and that should not trigger subscriptions.
|
GenericPlugin | public GenericPlugin()(Code) | | Creates an generic plugin
|
createAggregation | public boolean createAggregation(Iterator tasksToAgg, MPTask childTask, Plan plan, AllocationResultDistributor distributor)(Code) | | Creates and publishes aggregations for all of the tasks
in the input argument. For robustness, catches all errors we could
foresee, prints error messages and returns a boolean indicating
success or failure.
|
createExpansion | public void createExpansion(Iterator tasksForWorkflow, Task parentTask)(Code) | | |
execute | protected void execute()(Code) | | Called from cycle when something has changed or the plugin was triggered.
|
getGPMessageAddress | public MessageAddress getGPMessageAddress()(Code) | | Provides access to a protected method.
|
getPlanElementPredicate | abstract public UnaryPredicate getPlanElementPredicate()(Code) | | getPlanElementPredicate - returns predicate which screens for plan
elements which will need to have allocation results set. In this case,
plan elements associated with Ammunition Supply tasks
UnaryPredicate screens for plan elements which the packer isreponsible |
getTaskPredicate | public UnaryPredicate getTaskPredicate()(Code) | | getTaskPredicate - returns task predicate for task subscription
Default implementation subscribes to all non-internal tasks. Derived classes
should probably implement a more specific version.
UnaryPredicate - task predicate to be used. |
processChangedTasks | abstract public void processChangedTasks(Enumeration changedTasks)(Code) | | processChangedTasks - called during execute to handle changed tasks.
plugins should implement as appropriate.
Parameters: changedTasks - Enumeration of changed tasks |
processNewTasks | abstract public void processNewTasks(Enumeration newTasks)(Code) | | processNewTasks - called during execute to handle new tasks.
plugins should implement as appropriate.
Parameters: newTasks - Enumeration of new tasks |
processRemovedTasks | abstract public void processRemovedTasks(Enumeration removedTasks)(Code) | | processRemovedTasks - called during execute to handle removed tasks.
plugins should implement as appropriate.
Parameters: removedTasks - Enumeration of removed tasks |
reportQuantities | protected void reportQuantities()(Code) | | |
setupSubscriptions | protected void setupSubscriptions()(Code) | | setupSubscriptions - set up subscriptions to assets, tasks, and planElements.
Uses predicates returned by getTaskPredicate() & getPlanElementPredicate
|
testInstance | public boolean testInstance(Object arg, String ty)(Code) | | Function that tests if the first argument is of a given class
|
|
|