|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.jactr.modules.pm.common.efferent.EfferentCommandManager<C>
C - public abstract class EfferentCommandManager<C extends org.commonreality.efferent.IEfferentCommand>
abstract class used to manage specific efferent commands.Extending this class
will give you access to callbacks for the state changes of the commands. This
manager allows you to create and submit new commands (
newCommand(IEfferentObject, Object...) request changes (
request(DeltaTracker, org.commonreality.efferent.IEfferentCommand.RequestedState)
, execute and abort (execute(DeltaTracker)
abort(DeltaTracker)), and upon completion (typically called from
commandCompleted(IEfferentCommand) and
#commandAborted(IEfferentCommand)), the ability to remove the
command.
| Constructor Summary | |
|---|---|
EfferentCommandManager(java.util.concurrent.Executor executor)
|
|
| Method Summary | |
|---|---|
java.util.concurrent.Future<C> |
abort(org.commonreality.object.delta.DeltaTracker<? extends org.commonreality.object.IMutableObject> commandChange)
request that the command be aborted |
void |
clear()
explicitly request that executing commands are aborted, and issue a remove for all the other commands. |
java.util.concurrent.Future<C> |
execute(org.commonreality.object.delta.DeltaTracker<? extends org.commonreality.object.IMutableObject> commandChange)
request that the command be executed |
org.commonreality.agents.IAgent |
getAgent()
|
C |
getCommand(org.commonreality.identifier.IIdentifier commandId)
|
java.util.Set<org.commonreality.identifier.IIdentifier> |
getExecutingCommandIds(java.util.Set<org.commonreality.identifier.IIdentifier> container)
|
java.util.Collection<C> |
getExecutingCommands(java.util.Collection<C> container)
return all the commands that are currently executing |
org.commonreality.object.IEfferentObject |
getMuscle(org.commonreality.identifier.IIdentifier muscleId)
|
void |
install(org.commonreality.agents.IAgent agent)
|
boolean |
isAutoDeleteEnabled()
|
boolean |
isExecuting()
|
java.util.concurrent.Future<C> |
newCommand(org.commonreality.object.IEfferentObject object,
java.lang.Object... parameters)
create and submit a new command. |
void |
remove(C command)
request removal |
void |
setAutoDeleteEnabled(boolean enabled)
|
void |
uninstall(org.commonreality.agents.IAgent agent)
|
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public EfferentCommandManager(java.util.concurrent.Executor executor)
| Method Detail |
|---|
public void install(org.commonreality.agents.IAgent agent)
public void uninstall(org.commonreality.agents.IAgent agent)
public org.commonreality.agents.IAgent getAgent()
public org.commonreality.object.IEfferentObject getMuscle(org.commonreality.identifier.IIdentifier muscleId)
public C getCommand(org.commonreality.identifier.IIdentifier commandId)
public boolean isAutoDeleteEnabled()
public void setAutoDeleteEnabled(boolean enabled)
public void clear()
public final boolean isExecuting()
public final java.util.Set<org.commonreality.identifier.IIdentifier> getExecutingCommandIds(java.util.Set<org.commonreality.identifier.IIdentifier> container)
container -
public final java.util.Collection<C> getExecutingCommands(java.util.Collection<C> container)
container -
public final java.util.concurrent.Future<C> newCommand(org.commonreality.object.IEfferentObject object,
java.lang.Object... parameters)
createCommand(IEfferentObject, Object...) and can be used in
anyway desired.
object - parameters -
public java.util.concurrent.Future<C> execute(org.commonreality.object.delta.DeltaTracker<? extends org.commonreality.object.IMutableObject> commandChange)
commandChange -
public java.util.concurrent.Future<C> abort(org.commonreality.object.delta.DeltaTracker<? extends org.commonreality.object.IMutableObject> commandChange)
commandChange -
public final void remove(C command)
command -
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||