| org.cougaar.lib.filter.UTILPluginAdapter org.cougaar.lib.filter.UTILBufferingPluginAdapter org.cougaar.lib.filter.UTILExpanderPluginAdapter
All known Subclasses: org.cougaar.logistics.plugin.strattrans.StrategicTransportProjectorPlugin, org.cougaar.logistics.plugin.trans.TransportExpanderPlugin, org.cougaar.logistics.plugin.trans.AmmoLowFidelityExpanderPlugin, org.cougaar.logistics.plugin.trans.base.GLMTransOneToManyExpanderPlugin,
Method Summary | |
public void | changeExpansion(Expansion exp) The plugin changes the expansion. | protected UTILFilterCallback | createExpansionCallback() | protected UTILFilterCallback | createThreadCallback(UTILGenericListener bufferingThread) Provide the callback that is paired with the buffering thread, which is a
listener. | protected UTILFilterCallback | getInputTaskCallback() | public Vector | getSubtasks(Task t)
Implemented for UTILExpanderPlugin interface
The guts of the expansion. | public void | handleConstraintViolation(Expansion exp, List violatedConstraints) At least one constraint has been violated. | public void | handleFailedExpansion(Expansion exp, List failedSubTaskResults)
Implemented for UTILExpansionListener
An expansion has failed. | public void | handleIllFormedTask(Task t) Implemented for UTILBufferingPlugin
Got an ill-formed task, now handle it, by
publishing a failed expansion for the task. | public void | handleRemovedTask(Task t) | public void | handleSuccessfulExpansion(Expansion exp, List successfulSubtasks) Handle a successful expansion
Does nothing by default, unless very verbose output is turned on. | public void | handleTask(Task t)
Implemented for UTILGenericListener interface
This method Expands the given Task and publishes the PlanElement. | public boolean | interestingExpandedTask(Task t) Implemented for UTILExpansionListener
Gives plugin a way to filter out which expanded tasks it's
interested in. | public boolean | interestingTask(Task t) Implemented for UTILBufferingPlugin interface
filter for tasks you find interesting. | public void | localSetup() | public void | processTasks(List tasks) | public void | publishChangedExpansion(Expansion exp) | public void | reportChangedExpansion(Expansion exp) Report to superior that the expansion has changed. | public void | setupFilters()
The idea is to add subscriptions (via the filterCallback), and when
they change, to have the callback react to the change, and tell
the listener (many times the plugin) what to do. | public boolean | wantToChangeExpansion(Expansion exp)
Implemented for UTILExpansionListener
Does the plugin want to change the expansion?
For instance, although no individual preference may have been exceeded,
the total score for the expansion may exceed some threshold, and so the
plugin may want to alter the expansion. |
wantConfidence | protected boolean wantConfidence(Code) | | |
getSubtasks | public Vector getSubtasks(Task t)(Code) | |
Implemented for UTILExpanderPlugin interface
The guts of the expansion.
Default does nothing! Subclass should override.
|
handleConstraintViolation | public void handleConstraintViolation(Expansion exp, List violatedConstraints)(Code) | | At least one constraint has been violated. It's up to the plugin how to deal
with the violation(s).
Ideally, this will not happen very often, and when it does, we should hear about it.
Parameters: exp - expansion that failed Parameters: violatedConstraints - list of Constraints that have been violated |
handleFailedExpansion | public void handleFailedExpansion(Expansion exp, List failedSubTaskResults)(Code) | |
Implemented for UTILExpansionListener
An expansion has failed. It's up to the plugin how to deal with the
failure.
Just report it to superior, where hopefully it will be dealt with.
Dumps to error info about the failed tasks.
Parameters: exp - expansion that failed Parameters: failedSubTaskResults - - the subtasks of the expansion that failed |
handleIllFormedTask | public void handleIllFormedTask(Task t)(Code) | | Implemented for UTILBufferingPlugin
Got an ill-formed task, now handle it, by
publishing a failed expansion for the task.
Parameters: t - badly-formed task to handle |
handleRemovedTask | public void handleRemovedTask(Task t)(Code) | | react to a rescinded task -- by default does nothing
|
handleSuccessfulExpansion | public void handleSuccessfulExpansion(Expansion exp, List successfulSubtasks)(Code) | | Handle a successful expansion
Does nothing by default, unless very verbose output is turned on.
Parameters: exp - Expansion that has succeeded. |
handleTask | public void handleTask(Task t)(Code) | |
Implemented for UTILGenericListener interface
This method Expands the given Task and publishes the PlanElement.
The method expandTask should be implemented by child classes.
Parameters: t - the task to be expanded. |
interestingExpandedTask | public boolean interestingExpandedTask(Task t)(Code) | | Implemented for UTILExpansionListener
Gives plugin a way to filter out which expanded tasks it's
interested in.
Parameters: t - Task that has been expanded (getTask of Expansion) true if task is interesting to this plugin |
interestingTask | public boolean interestingTask(Task t)(Code) | | Implemented for UTILBufferingPlugin interface
filter for tasks you find interesting.
Parameters: t - Task to check for interest boolean true if task is interesting See Also: UTILBufferingPlugin |
localSetup | public void localSetup()(Code) | | |
processTasks | public void processTasks(List tasks)(Code) | | Implemented for UTILBufferingPlugin interface
Parameters: tasks - that have been buffered up to this point See Also: UTILBufferingPlugin |
reportChangedExpansion | public void reportChangedExpansion(Expansion exp)(Code) | | Report to superior that the expansion has changed. Usually just a pass
through to the UTILPluginAdapter's updateAllocationResult.
Parameters: exp - Expansion that has changed. See Also: UTILPluginAdapter.updateAllocationResult |
setupFilters | public void setupFilters()(Code) | |
The idea is to add subscriptions (via the filterCallback), and when
they change, to have the callback react to the change, and tell
the listener (many times the plugin) what to do.
Override and call super to add new filters, or override
createXXXCallback to change callback behaviour.
|
wantToChangeExpansion | public boolean wantToChangeExpansion(Expansion exp)(Code) | |
Implemented for UTILExpansionListener
Does the plugin want to change the expansion?
For instance, although no individual preference may have been exceeded,
the total score for the expansion may exceed some threshold, and so the
plugin may want to alter the expansion.
Defaults to FALSE.
See Also: org.cougaar.lib.util.UTILAllocate.scoreAgainstPreferences Parameters: exp - expansion to check true if plugin wants to change expansion |
|
|