|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.cougaar.util.GenericStateModelAdapter
org.cougaar.core.blackboard.BlackboardClientComponent
org.cougaar.core.plugin.ComponentPlugin
org.cougaar.pizza.plugin.PlaceOrderPlugin
org.cougaar.pizza.plugin.SDPlaceOrderPlugin
The SDPlaceOrderPlugin extends the PlaceOrderPlugin to use Service Discovery
to find pizza providers dynamically. Once the plugin receives the PizzaPreferences
object, it publishes a Constants.Verbs.FIND_PROVIDERS task with a Role of Constants.Roles.PIZZAPROVIDER. This task
will be handled by Service Discovery. The plugin then creates and expands the Constants.Verbs.ORDER
Task as done in the super class. However, unlike the super class, this plugin waits
until Service Discovery has finished finding a pizza provider and has added a
Disposition on the FindProviders task before it can allocate the pizza subtasks.
Constants.Prepositions.NOT with the name of the
provider as the indirect object on the FindProviders task. Once a new provider is
found the tasks will be reallocated -- hopefully more succesfully!
| 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.pizza.plugin.PlaceOrderPlugin |
ALLOCATION_PRED, allocationSub, domainService, EXPANSION_PRED, expansionSub, logger, PIZZA_PREF_PRED, pizzaPrefSub, planningFactory, SELF_PRED, selfSub |
| 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 | |
SDPlaceOrderPlugin()
|
|
| Method Summary | |
protected void |
execute()
When we get the PizzaPreferences object (that subscription is changed), ask ServiceDiscovery to find a provider. |
protected org.cougaar.planning.ldm.asset.Entity |
getProvider(org.cougaar.planning.ldm.plan.Disposition disposition)
Find a PizzaProvider to try using, avoiding the provider on the given Disposition if any. |
protected void |
setupSubscriptions()
Overrides the super class method. |
| Methods inherited from class org.cougaar.pizza.plugin.PlaceOrderPlugin |
allocateSubtasks, createOrderTask, createPizzaSubtasks, getChangedExpansion, getPizzaPreferences, getProvider, getSelfEntity, load, logExpansionResults, makeExpansion, makePizzaAsset, makeQuantityPreference, makeTask, printAllocationResults, printExpansionResults, setDomainService, updateOrderAllocationResults |
| 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 |
public SDPlaceOrderPlugin()
| Method Detail |
protected void setupSubscriptions()
setupSubscriptions in class PlaceOrderPluginprotected void execute()
execute in class PlaceOrderPluginprotected org.cougaar.planning.ldm.asset.Entity getProvider(org.cougaar.planning.ldm.plan.Disposition disposition)
disposition - whose previous Provider to avoid
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||