de.cesr.lara.components.eventbus
Interface LaraEventSubscriber

All Superinterfaces:
LaraAbstractEventSubscriber
All Known Subinterfaces:
LaraAgent<A,BO>
All Known Implementing Classes:
Agent, Environment, HouseplantModel, LAbstractAgent, LAbstractRsModel, MyAgent, MyModel, MyOutput, MyRsContextBuilder, SimpleCsvOutput, SimpleOutput, SimplePerformanceStatistics

public interface LaraEventSubscriber
extends LaraAbstractEventSubscriber

Common interface for subscribers of events.


Method Summary
<T extends LaraEvent>
void
onEvent(T event)
          Will be called with an event as a parameter when an event the subscriber subscribed to occurs.
 

Method Detail

onEvent

<T extends LaraEvent> void onEvent(T event)
Will be called with an event as a parameter when an event the subscriber subscribed to occurs. Implement this to react on events. Typically you would start doing something like if (event instanceof VeryInterestingEvent) { //do something smart }

Parameters:
event -