View Javadoc

1   package cz.cuni.amis.pogamut.base.communication.connection;
2   
3   import java.io.Reader;
4   
5   import cz.cuni.amis.pogamut.base.communication.connection.exception.ConnectionException;
6   import cz.cuni.amis.pogamut.base.communication.exception.CommunicationException;
7   import cz.cuni.amis.pogamut.base.component.IComponent;
8   import cz.cuni.amis.pogamut.base.utils.guice.AgentScoped;
9   
10  /**
11   * Interface that returns a reader that can be used to get messages from the world.
12   * @author Jimmy
13   */
14  public interface IWorldReaderProvider extends IComponent {
15  	
16  	/**
17  	 * To be used by (usually) IParser upon IParser.start() method call to obtain a world reader.
18  	 * <p><p>
19  	 * Use reader.close() to close the connection.
20  	 * 
21  	 * @return
22  	 * @throws ConnectionException
23  	 */
24  	public WorldReader getReader() throws CommunicationException;
25  	
26  }