| org.cougaar.lib.vishnu.client.VishnuPlugin org.cougaar.lib.vishnu.client.VishnuExpanderPlugin
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. | public Vector | getSubtasks(Task t) Implemented for expand.rPlugin interface
The guts of the expansion. | public void | handleAssignment(Task task, Asset asset, Date start, Date end, Date setupStart, Date wrapupEnd, String contribs, String taskText) Makes expansions given the task-to-asset assignment.
If the task has a setup or wrapup duration, and expansion is made and
then the subtasks get allocated with the setup and wrapup durations. | public void | handleConstraintViolation(Expansion exp, List violatedConstraints) At least one constraint has been violated. | public void | handleFailedExpansion(Expansion exp, List failedSubtasks) | 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) Here's where we react to a rescinded task. | public void | handleSuccessfulExpansion(Expansion exp, List successfulSubtasks) | 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 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. |
createThreadCallback | protected UTILFilterCallback createThreadCallback(UTILGenericListener bufferingThread)(Code) | |
Provide the callback that is paired with the buffering thread, which is a
listener. The buffering thread is the listener to the callback
Creates an instance of the ExpandableTaskCallback, which means the plugin
is looking for tasks that are naked, and not yet expanded or part of workflows.
Parameters: bufferingThread - -- the thread the callback informs when there are new input tasks an ExpandableTaskCallback with the buffering thread as its listener See Also: org.cougaar.lib.callback.UTILWorkflowCallback |
getSubtasks | public Vector getSubtasks(Task t)(Code) | | Implemented for expand.rPlugin interface
The guts of the expansion.
Default does nothing! Subclass should override.
|
handleAssignment | public void handleAssignment(Task task, Asset asset, Date start, Date end, Date setupStart, Date wrapupEnd, String contribs, String taskText)(Code) | | Makes expansions given the task-to-asset assignment.
If the task has a setup or wrapup duration, and expansion is made and
then the subtasks get allocated with the setup and wrapup durations.
Subclasses should override with a method that attaches information representing
the assignment via a preposition and also call makeSetupAndWrapupTasks to
create the optional setup and wrapup tasks. Probably a downstream allocator will
use the preposition information to create an allocation to the assigned asset.
See Also: org.cougaar.lib.vishnu.client.VishnuPlugin.makeSetupAndWrapupTasks Parameters: task - task being assigned to asset Parameters: asset - asset handling the task Parameters: start - start of the main task Parameters: end - end of the main task Parameters: setupStart - start of a setup task, equal to start if there is no setup task Parameters: wrapupEnd - end of a wrapup task, equal to end if there is no wrapup task |
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 - that failed Parameters: violatedConstraints - of Constraints that have been violated |
handleFailedExpansion | public void handleFailedExpansion(Expansion exp, List failedSubtasks)(Code) | | Handle a failed expansion
Also must remove the GSTaskGroup from the GSS SchedulerResult
storage
Parameters: exp - Expansion that has succeeded. |
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) | | Here's where we react to a rescinded task.
does nothing by default
|
handleSuccessfulExpansion | public void handleSuccessfulExpansion(Expansion exp, List successfulSubtasks)(Code) | | Handle a successful expansion
Also must remove the GSTaskGroup from the GSS SchedulerResult
storage
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 |
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.
Parameters: exp - to check true if plugin wants to change expansion |
Methods inherited from org.cougaar.lib.vishnu.client.VishnuPlugin | protected void appendGlobalDataFormat(Document problemFormatDoc)(Code)(Java Doc) protected void attachAssociatedFiles(Document problemFormatDoc)(Code)(Java Doc) public void clearChangedAssets()(Code)(Java Doc) protected void clearTasks()(Code)(Java Doc) protected UTILAssetCallback createAssetCallback()(Code)(Java Doc) protected SchedulerLifecycle createDirectMode()(Code)(Java Doc) protected DirectResultHandler createDirectResultHandler()(Code)(Java Doc) protected SchedulerLifecycle createExternalMode()(Code)(Java Doc) protected SchedulerLifecycle createInternalMode()(Code)(Java Doc) protected Task createMainTask(Task task, Asset asset, Date start, Date end, Date setupStart, Date wrapupEnd)(Code)(Java Doc) protected Task createSetupTask(Task task, Asset asset, Date start, Date end, Date setupStart, Date wrapupEnd)(Code)(Java Doc) protected VishnuComm createVishnuComm()(Code)(Java Doc) protected VishnuConfig createVishnuConfig()(Code)(Java Doc) protected VishnuDomUtil createVishnuDomUtil()(Code)(Java Doc) protected Task createWrapupTask(Task task, Asset asset, Date start, Date end, Date setupStart, Date wrapupEnd)(Code)(Java Doc) protected XMLProcessor createXMLProcessor()(Code)(Java Doc) protected XMLResultHandler createXMLResultHandler()(Code)(Java Doc) protected Collection getAllAssets()(Code)(Java Doc) protected UTILAssetCallback getAssetCallback()(Code)(Java Doc) public Asset getAssetForKey(StringKey key)(Code)(Java Doc) public Collection getChangedAssets()(Code)(Java Doc) public XMLizer getDataXMLizer()(Code)(Java Doc) public int getNumAssets()(Code)(Java Doc) public int getNumTasks()(Code)(Java Doc) protected Vector getPreferences(Task parentTask, Date readyAt, Date earliest, Date best, Date latest)(Code)(Java Doc) protected Vector getPrepPhrases(Task parentTask, Asset a)(Code)(Java Doc) public boolean getRunDirectly()(Code)(Java Doc) public Task getTaskForKey(StringKey key)(Code)(Java Doc) public String getTaskName()(Code)(Java Doc) public Collection getTasks()(Code)(Java Doc) public void handleAssignment(org.cougaar.planning.ldm.plan.Task task, Asset asset, Date start, Date end, Date setupStart, Date wrapupEnd, String contribs, String taskText)(Code)(Java Doc) public void handleChangedAssets(Enumeration changedAssets)(Code)(Java Doc) public void handleIllFormedTask(Task t)(Code)(Java Doc) protected void handleImpossibleTasks(Collection impossibleTasks)(Code)(Java Doc) public void handleMultiAssignment(Vector tasks, Asset asset, Date start, Date end, Date setupStart, Date wrapupEnd, boolean assetWasUsedBefore)(Code)(Java Doc) public void handleNewAssets(Enumeration newAssets)(Code)(Java Doc) protected void handleRemovedTasks(Enumeration removedTasks)(Code)(Java Doc) protected void initializeWithStoredFormat()(Code)(Java Doc) public boolean interestingAsset(Asset a)(Code)(Java Doc) public boolean interestingTask(Task t)(Code)(Java Doc) public void localSetup()(Code)(Java Doc) protected List makeSetupWrapupExpansion(Task task, Asset asset, Date start, Date end, Date setupStart, Date wrapupEnd)(Code)(Java Doc) protected void prepareData(List stuffToSend, Document objectFormatDoc)(Code)(Java Doc) protected void prepareObjectFormat(List tasks)(Code)(Java Doc) protected Document prepareStoredObjectFormat()(Code)(Java Doc) public void prepareVishnuObjects(List tasksAndResources, Collection changedAssets, List vishnuTasks, List vishnuResources, List changedVishnuResources, Document objectFormat, SchedulingData schedData)(Code)(Java Doc) public void processTasks(List tasks)(Code)(Java Doc) protected void publishAddWithCheck(Object obj)(Code)(Java Doc) public void publishSubtasks(boolean wantConfidence, Task t, List subtasks)(Code)(Java Doc) public void removeTask(StringKey key)(Code)(Java Doc) protected Map sendFormat(Collection templates, String assetClassName)(Code)(Java Doc) protected void setUIDToObjectMap(Collection objects, Map UIDtoObject)(Code)(Java Doc) public void setupFilters()(Code)(Java Doc) protected void unfreezeTasks(Collection tasks)(Code)(Java Doc) protected void waitForAnswer()(Code)(Java Doc)
|
|
|