cz.cuni.amis.pogamut.defcon.communication.translator
Class DefConMessageProducer
java.lang.Object
cz.cuni.amis.pogamut.defcon.communication.translator.DefConMessageProducer
- All Implemented Interfaces:
- cz.cuni.amis.pogamut.base.communication.translator.event.IWorldChangeEventOutput, cz.cuni.amis.pogamut.base.component.IComponent
public class DefConMessageProducer
- extends Object
- implements cz.cuni.amis.pogamut.base.communication.translator.event.IWorldChangeEventOutput
This class retrieves events from GameInfo class and prepares them for the next stage of
processing in DefConWorldView.
- Author:
- Radek 'Black_Hand' Pibil
|
Field Summary |
static cz.cuni.amis.utils.token.Token |
COMPONENT_ID
|
|
Constructor Summary |
DefConMessageProducer(cz.cuni.amis.pogamut.base.component.bus.IComponentBus eventBus,
cz.cuni.amis.pogamut.base.utils.logging.IAgentLogger logger)
|
COMPONENT_ID
public static final cz.cuni.amis.utils.token.Token COMPONENT_ID
DefConMessageProducer
@Inject
public DefConMessageProducer(cz.cuni.amis.pogamut.base.component.bus.IComponentBus eventBus,
cz.cuni.amis.pogamut.base.utils.logging.IAgentLogger logger)
getEvent
public cz.cuni.amis.pogamut.base.communication.translator.event.IWorldChangeEvent getEvent()
throws cz.cuni.amis.pogamut.base.communication.exception.CommunicationException
- Used by worldview to retrieve one enqueued event.
Works only if the game has been started.
- Specified by:
getEvent in interface cz.cuni.amis.pogamut.base.communication.translator.event.IWorldChangeEventOutput
- Returns:
- dequeued event
- Throws:
cz.cuni.amis.pogamut.base.communication.exception.CommunicationException
toString
public String toString()
- Overrides:
toString in class Object
getComponentId
public cz.cuni.amis.utils.token.IToken getComponentId()
- Specified by:
getComponentId in interface cz.cuni.amis.pogamut.base.component.IComponent
update
public void update()
- Since update is called periodically from worldview, we use it to call populateQueue() periodically
getStartTime
public float getStartTime()
getCurrentTime
public float getCurrentTime()
getGameInfo
public GameInfo getGameInfo()
Copyright © 2015 AMIS research group, Faculty of Mathematics and Physics, Charles University in Prague, Czech Republic. All Rights Reserved.