cz.cuni.amis.pogamut.defcon.communication.translator
Class DefConMessageProducer
java.lang.Object
cz.cuni.amis.pogamut.defcon.communication.translator.DefConMessageProducer
- All Implemented Interfaces:
- IWorldChangeEventOutput, IComponent
public class DefConMessageProducer
- extends Object
- implements 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
|
COMPONENT_ID
public static final cz.cuni.amis.utils.token.Token COMPONENT_ID
DefConMessageProducer
@Inject
public DefConMessageProducer(IComponentBus eventBus,
IAgentLogger logger)
getEvent
public IWorldChangeEvent getEvent()
throws CommunicationException
- Used by worldview to retrieve one enqueued event.
Works only if the game has been started.
- Specified by:
getEvent in interface IWorldChangeEventOutput
- Returns:
- dequeued event
- Throws:
CommunicationException
toString
public String toString()
- Overrides:
toString in class Object
getComponentId
public cz.cuni.amis.utils.token.IToken getComponentId()
- Specified by:
getComponentId in interface 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 © 2013 AMIS research group, Faculty of Mathematics and Physics, Charles University in Prague, Czech Republic. All Rights Reserved.