|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcz.cuni.amis.pogamut.base.agent.module.AgentModule<AGENT>
cz.cuni.amis.pogamut.base.agent.module.SensorModule<USAR2004Bot>
cz.cuni.amis.pogamut.usar2004.agent.module.master.ResponseModule
public class ResponseModule
This is basically a queue for RES messages. User sends commands to the server and this module catches ResponseMessages that contain information about Server state. All masterm modules are singletons.
Field Summary | |
---|---|
protected cz.cuni.amis.pogamut.usar2004.agent.module.master.ResponseModule.ResponseMessageListener |
confListener
|
protected static ResponseModule |
singleton
|
Fields inherited from class cz.cuni.amis.pogamut.base.agent.module.SensorModule |
---|
worldView |
Fields inherited from class cz.cuni.amis.pogamut.base.agent.module.AgentModule |
---|
agent, controller, eventBus, log |
Constructor Summary | |
---|---|
ResponseModule(USAR2004Bot bot)
Private ctor |
Method Summary | |
---|---|
protected SuperResponse |
createNewSensor(ResponseMessage message)
Asks ResponseType enum if it knows ResponseType represented by string type. |
static ResponseModule |
getModuleInstance(USAR2004Bot bot)
Method for obtaining the singleton. |
SuperResponse |
peek()
This method offers to peek on the beginning of the queue, but the queue stays intact. |
SuperResponse |
pull()
Removes one message from the queue and offers this very object as an output. |
int |
size()
Returns number of messages waiting in the queue. |
Methods inherited from class cz.cuni.amis.pogamut.base.agent.module.AgentModule |
---|
cleanUp, getComponentId, getLog, getState, initComponentId, isRunning, kill, pause, reset, resume, start, stop, toString |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected cz.cuni.amis.pogamut.usar2004.agent.module.master.ResponseModule.ResponseMessageListener confListener
protected static ResponseModule singleton
Constructor Detail |
---|
public ResponseModule(USAR2004Bot bot)
bot
- USAR2004Bot variable for creating instance of each new record
in responseModules(due to inheritance)Method Detail |
---|
protected SuperResponse createNewSensor(ResponseMessage message)
type
- String representing possible valid ResponseType.
public static ResponseModule getModuleInstance(USAR2004Bot bot)
bot
- USAR2004Bot parameter for creation of the singleton instance
when called for the first time.
public SuperResponse peek()
public SuperResponse pull()
public int size()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |