Method Summary |
|
final protected void | chooseThreadingModel(int m) Set the current choice of threading model. |
protected boolean | claim(Object o) Attempt to stake a claim on a logplan object, essentially telling
everyone else that you and only you will be disposing, modifying, etc. |
final protected void | closeTransaction() |
final protected void | closeTransaction(boolean resetp) |
final protected void | closeTransactionDontReset() |
protected PluginDelegate | createDelegate() |
protected Threading | createThreadingModel() create a Threading model object as specified by the plugin.
The default implementation creates a Threading object
based on the value of threadingChoice.
The default choice is to use a SharedThreading model, which
shares thread of execution with others of the same sort in
the agent.
Most plugins can ignore this altogether. |
public long | currentTimeMillis() What is the current Scenario time?
Note that this facility is not appropriate to use for
load-balancing purposes, as scenario time is discontinuous
and may even stop. |
protected void | cycle() |
public boolean | didRehydrate() |
public boolean | didRehydrate(BlackboardService subscriber) |
final protected MessageAddress | getAgentIdentifier() |
final protected AlarmService | getAlarmService() |
final protected PluginBindingSite | getBindingSite() |
public String | getBlackboardClientName() |
final public BlackboardService | getBlackboardService() Safely return our BlackboardService
Plugin.load() must have completed in order
for the value to be defined. |
final protected ClusterServesPlugin | getCluster() let subclasses get ahold of the cluster without having to catch it at
load time. |
protected ConfigFinder | getConfigFinder() |
public Date | getDate() what is the current (COUGAAR) time as a Date object?
Note: currentTimeMillis() is preferred, as it gives
more control over timezone, calendar, etc. |
final protected PluginDelegate | getDelegate() |
final protected DemoControlService | getDemoControlService() |
final public DomainService | getDomainService() |
final protected PlanningFactory | getFactory() |
final protected Factory | getFactory(String s) |
final protected LDMServesPlugin | getLDM() |
final protected LDMService | getLDMService() |
final protected MessageAddress | getMessageAddress() |
public Vector | getParameters() get any Plugin parameters passed by the plugin instantiator. |
final public PrototypeRegistryService | getPrototypeRegistryService() |
public int | getPublishAddedCount() |
public int | getPublishChangedCount() |
public int | getPublishRemovedCount() |
final protected SchedulerService | getSchedulerService() |
protected BlackboardService | getSubscriber() |
public int | getSubscriptionCount() |
public int | getSubscriptionSize() |
final protected int | getThreadingChoice() the current choice of threading model. |
final protected Threading | getThreadingModel() |
final protected UIDServer | getUIDServer() |
final public UIDService | getUIDService() |
public void | initialize() |
public void | load() |
public void | load(Object object) Load the plugin. |
final protected void | openTransaction() |
public long | parseInterval(String param) |
public long | parseIntervalParameter(int paramIndex) |
public void | plugin_cycle() |
public void | plugin_prerun() |
protected void | prerun() |
final protected void | publishAdd(Object o) |
final protected void | publishChange(Object o) |
final protected void | publishChange(Object o, Collection changes) mark an element of the Plan as changed.
Behavior is not defined if the object is not a member of the plan.
There is no need to call this if the object was added or removed,
only if the contents of the object itself has been changed.
The changes parameter describes a set of changes made to the
object beyond those tracked automatically by the object class
(see the object class documentation for a description of which
types of changes are tracked). |
final protected void | publishRemove(Object o) |
final protected Collection | query(UnaryPredicate isMember) Issue a query against the logplan. |
public void | resume() |
final public void | setAgentIdentificationService(AgentIdentificationService ais) |
final public void | setAlarmService(AlarmService s) |
final public void | setAwakened(boolean value) |
final public void | setBindingSite(BindingSite bs) |
public void | setBlackboardService(BlackboardService s) |
final public void | setDemoControlService(DemoControlService dcs) |
public void | setDomainService(DomainService ds) |
final public void | setLDMService(LDMService s) |
public void | setParameter(Object param) |
public void | setPrototypeRegistryService(PrototypeRegistryService prs) |
final public void | setSchedulerService(SchedulerService ss) |
final protected void | setThreadingChoice(int m) Set the current choice of threading model. |
final protected void | setThreadingModel(Threading t) |
public void | setUIDService(UIDService us) |
public void | start() |
public void | startThreadingModel() |
final protected Subscription | subscribe(UnaryPredicate isMember) Request a subscription to all objects for which
isMember.execute(object) is true. |
final protected Subscription | subscribe(UnaryPredicate isMember, Collection realCollection) like subscribe(UnaryPredicate), but allows specification of
some other type of Collection object as the internal representation
of the collection. |
final protected Subscription | subscribe(UnaryPredicate isMember, boolean isIncremental) |
final protected Subscription | subscribe(UnaryPredicate isMember, Collection realCollection, boolean isIncremental) Alias for getBlackboardService().subscribe(UnaryPredicate, Collection, boolean);
Parameters: isMember - a predicate to execute to ascertainmembership in the collection of the subscription. Parameters: realCollection - a container to hold the contents of the subscription. Parameters: isIncremental - should be true if an incremental subscription is desired.An incremental subscription provides access to the incremental changes to the subscription. |
public void | suspend() |
public String | toString() |
final protected boolean | tryOpenTransaction() |
protected void | unclaim(Object o) Release an existing claim on a logplan object. |
final protected void | unsubscribe(Subscription subscription) Cancels the given Subscription which must have been returned by a
previous invocation of subscribe(). |
final public void | wake() Hook which allows a plugin thread to request that the
primary plugin thread (the execute() method) be called.
Generally used when you want the plugin to be stimulated
by some non-internal state change ( e.g. |
public Alarm | wakeAfter(long delayTime) Convenience method to specify period of time to wait before
stimulating plugin (based on COUGAAR scenario time). |
public Alarm | wakeAfterRealTime(long delayTime) like wakeAfter() except always in real (wallclock) time. |
public Alarm | wakeAt(long wakeTime) Convenience method to specify given time to stimulate plugin.
(based on COUGAAR scenario time). |
public Alarm | wakeAtRealTime(long wakeTime) like wakeAt() except always in real (wallclock) time. |
protected boolean | wasAwakened() true IFF were we awakened explicitly (i.e. |