cz.cuni.amis.pogamut.defcon.communication.translator
Class DefConMessageProducer

Package class diagram package DefConMessageProducer
java.lang.Object
  extended by 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
           
 
Constructor Summary
DefConMessageProducer(IComponentBus eventBus, IAgentLogger logger)
           
 
Method Summary
 cz.cuni.amis.utils.token.IToken getComponentId()
           
 float getCurrentTime()
           
 IWorldChangeEvent getEvent()
          Used by worldview to retrieve one enqueued event.
 GameInfo getGameInfo()
           
 float getStartTime()
           
 String toString()
           
 void update()
          Since update is called periodically from worldview, we use it to call populateQueue() periodically
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

COMPONENT_ID

public static final cz.cuni.amis.utils.token.Token COMPONENT_ID
Constructor Detail

DefConMessageProducer

@Inject
public DefConMessageProducer(IComponentBus eventBus,
                                    IAgentLogger logger)
Method Detail

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.