View Javadoc

1   package cz.cuni.amis.pogamut.base.communication.worldview;
2   
3   import cz.cuni.amis.pogamut.base.communication.translator.event.IWorldChangeEvent;
4   import cz.cuni.amis.pogamut.base.component.IComponent;
5   import cz.cuni.amis.pogamut.base.component.bus.exception.ComponentNotRunningException;
6   import cz.cuni.amis.pogamut.base.component.bus.exception.ComponentPausedException;
7   
8   /**
9    * Input interface for the world view. {@link IWorldView} receives new events through this interface.
10   * 
11   * @author Jimmy
12   */
13  public interface IWorldChangeEventInput extends IComponent {
14  
15  	/**
16  	 * New event was generated from the world.
17  	 * 
18  	 * @param event
19  	 */
20  	public void notify(IWorldChangeEvent event) throws ComponentNotRunningException, ComponentPausedException;
21  	
22  	/**
23  	 * Raise another event after current one finishes its propagation.
24  	 * <p><p>
25  	 * Won't propagate the event if the world view is locked!.
26  	 * 
27  	 * @param event
28  	 * @throws ComponentNotRunningException
29  	 * @throws ComponentPausedException
30  	 */
31  	public void notifyAfterPropagation(IWorldChangeEvent event) throws ComponentNotRunningException, ComponentPausedException;
32  	
33  	/**
34  	 * Notify immediately will process the event right away, it won't use "event recursion buffer" to postpone the processing of the event.
35  	 * <p><p>
36  	 * This will work even if the world view is locked!
37  	 * 
38  	 * @param event
39  	 * @throws ComponentNotRunningException
40  	 * @throws ComponentPausedException
41  	 */
42  	public void notifyImmediately(IWorldChangeEvent event) throws ComponentNotRunningException, ComponentPausedException;
43      
44  }