View Javadoc

1   package cz.cuni.amis.pogamut.base.component.bus.event;
2   
3   import cz.cuni.amis.pogamut.base.component.IComponent;
4   import cz.cuni.amis.pogamut.base.component.bus.IComponentEvent;
5   
6   /**
7    * This event is similar to {@link IStartingEvent}, it marks that the component is going to start.
8    * In contrast to starting event, it is additionally telling that after the start, the component is going to be paused,
9    * i.e., it won't broadcast {@link IStartedEvent} but it will broadcast {@link IPausedEvent}.
10   * <p><p>
11   * Such event is needed if we need to synchronize the start of the multi-agent simulation where we have to
12   * <ol>
13   * <li>construct all agent instances</li>
14   * <li>start all agent instances in paused state</li>
15   * <li>resume all agent instances at once</li>
16   * </ol>
17   * Otherwise we're facing the trouble that some agent will become effective in the environment before others crippling the plausibility of
18   * such simulation and violating agent's assumptions (that there are comrades / enemies present in the environment from the beginning of the simulation).
19   * 
20   * @author Jimmy
21   *
22   * @param <SOURCE>
23   */
24  public interface IStartingPausedEvent<SOURCE extends IComponent> extends IComponentEvent<SOURCE> {
25  
26  	/**
27  	 * Provides human readable information why the component is starting.
28  	 * @return
29  	 */
30  	public String getMessage();
31  	
32  }