|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface IAct
IAct provides a way to send command messages to the world allowing you to attach listeners to outgoing commands.
Method Summary | |
---|---|
void |
act(CommandMessage command)
Execute an action in the world. |
void |
addCommandListener(java.lang.Class commandClass,
ICommandListener listener)
Attach listener to outgoing commands from body. |
boolean |
isCommandListening(java.lang.Class commandClass,
ICommandListener listener)
Whether the listener is listening for commands of commandClass. |
void |
removeCommandListener(java.lang.Class commandClass,
ICommandListener listener)
Remove the listener to outgoing commands. |
Methods inherited from interface cz.cuni.amis.pogamut.base.component.IComponent |
---|
getComponentId |
Method Detail |
---|
void act(CommandMessage command) throws ComponentNotRunningException, ComponentPausedException
May block.
Should serialize the command object and send it through the writer that is usually provided by IWorldWriterProvider
.
ComponentNotRunningException
ComponentPausedException
void addCommandListener(java.lang.Class commandClass, ICommandListener listener)
After the command is sent to the world, listener will be notified.
commandClass
- which command you want to listen tolistener
- boolean isCommandListening(java.lang.Class commandClass, ICommandListener listener)
commandClass
- listener
-
void removeCommandListener(java.lang.Class commandClass, ICommandListener listener)
commandClass
- which command you want to listen tolistener
-
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |