View Javadoc

1   package cz.cuni.amis.pogamut.base.communication.translator;
2   
3   import cz.cuni.amis.pogamut.base.communication.messages.InfoMessage;
4   import cz.cuni.amis.pogamut.base.communication.translator.event.IWorldChangeEvent;
5   import cz.cuni.amis.pogamut.base.communication.translator.exception.TranslatorException;
6   import cz.cuni.amis.pogamut.base.component.bus.exception.ComponentNotRunningException;
7   import cz.cuni.amis.pogamut.base.component.bus.exception.ComponentPausedException;
8   
9   /**
10   * This is handler for messages that should produce IWorldChangeEvent(s) out of
11   * messages we receive from the world.
12   * @author Jimmy
13   */
14  public interface IWorldMessageTranslator {
15  
16  	/**
17  	 * The handler must process the message and return 0,1 or more world events.
18  	 * @param message
19  	 * @return
20  	 */
21  	public IWorldChangeEvent[] processMessage(InfoMessage message) throws TranslatorException, ComponentNotRunningException, ComponentPausedException;
22  	
23  	/**
24  	 * Reinitialize the translator.
25  	 */
26  	public void reset();
27  	
28  }