|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface ICommandHandlerDelegate
delegatable command handler that processes specific types of IEfferentCommands. This
in combination with the EfferentCommandHandler allows one to more readily extend
the range of commands handled
| Method Summary | |
|---|---|
void |
abort(IEfferentCommand command,
IAgentObject agent,
EfferentCommandHandler parent)
|
ICommandTimingEquation |
getTimingEquation(IEfferentCommand command,
IAgentObject agent,
EfferentCommandHandler handler)
return the timing equation used |
boolean |
shouldAbort(IEfferentCommand command,
IAgentObject agent,
EfferentCommandHandler handler)
return Boolean.TRUE if the command should abort (it will already be running). |
java.lang.Object |
shouldAccept(IEfferentCommand command,
IAgentObject agent,
EfferentCommandHandler handler)
return Boolean.TRUE if the command should be accepted for the specified agent. |
java.lang.Object |
shouldStart(IEfferentCommand command,
IAgentObject agent,
EfferentCommandHandler handler)
return Boolean.TRUE if the command should be started. |
void |
start(IEfferentCommand command,
IAgentObject agent,
EfferentCommandHandler parent)
actually start the processing of the command. |
| Method Detail |
|---|
java.lang.Object shouldAccept(IEfferentCommand command,
IAgentObject agent,
EfferentCommandHandler handler)
command - agent - handler -
java.lang.Object shouldStart(IEfferentCommand command,
IAgentObject agent,
EfferentCommandHandler handler)
EfferentCommandHandler will next call start(IEfferentCommand, IAgentObject, EfferentCommandHandler) and
then send a state update for the command noting that the actual state is running.
command - agent - handler -
boolean shouldAbort(IEfferentCommand command,
IAgentObject agent,
EfferentCommandHandler handler)
EfferentCommandHandler will next call abort(IEfferentCommand, IAgentObject, EfferentCommandHandler)
and send a state update for the command with its actual state as ABORTED
command - agent - handler -
ICommandTimingEquation getTimingEquation(IEfferentCommand command,
IAgentObject agent,
EfferentCommandHandler handler)
command - agent - handler -
void start(IEfferentCommand command,
IAgentObject agent,
EfferentCommandHandler parent)
EfferentCommandHandler is passed along
as well so that later EfferentCommandHandler.completed(IEfferentCommand, Object) may be called.
However, it should not be called from within here. The reason is simple, after returning
from start, EfferentCommandHandler will set the state of the command as RUNNING. If you call
EfferentCommandHandler.completed(IEfferentCommand, Object) from within start, the states will
be inconsistent
command - agent - parent -
void abort(IEfferentCommand command,
IAgentObject agent,
EfferentCommandHandler parent)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||