View Javadoc

1   package cz.cuni.amis.pogamut.base.communication.parser;
2   
3   import cz.cuni.amis.pogamut.base.communication.exception.CommunicationException;
4   import cz.cuni.amis.pogamut.base.communication.messages.InfoMessage;
5   import cz.cuni.amis.pogamut.base.component.IComponent;
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   * Message parser has a method for reading and parsing messages from the world.
11   * <p><p>
12   * It should be initialized with IWorldReaderProvider and implement serialization of the
13   * message to string.
14   * 
15   * @author Jimmy
16   */
17  public interface IWorldMessageParser extends IComponent {
18  	
19  	/**
20  	 * May block.
21  	 * <BR><BR>
22  	 * Should get and parse next message from the reader.
23  	 * 
24  	 * @return parsed message
25  	 */
26  	public InfoMessage parse() throws CommunicationException, ComponentNotRunningException, ComponentPausedException;
27  	
28  }