cfa.vo.iris.events
Interface IEvent<SourceClass,ListenerClass,PayloadClass>

All Known Implementing Classes:
GenericEvent, LogEvent, MultipleSegmentEvent, PluginJarEvent, PointEvent, SedEvent, SegmentEvent, XSedEvent, XSegmentEvent

public interface IEvent<SourceClass,ListenerClass,PayloadClass>

Events are singletons that can register listeners and, when fired, notify the registered listeners by calling their callback methods. This is a generic interface that needs to be constrained by the implementing classes with the class of sources for which the event will be fired, the class of listeners bound to the event class and the class of the Payload object. Events and Listeners constitute the Extensible Event Framework

Author:
olaurino

Method Summary
 void add(ListenerClass listener)
          This method adds a new listener to the event.
 void fire(SourceClass source, PayloadClass payload)
          This method can be invoked to fire the EventCommand command for the source object.
 void remove(ListenerClass listener)
          This method removes a listener from the event.
 

Method Detail

add

void add(ListenerClass listener)
This method adds a new listener to the event.

Parameters:
listener -

remove

void remove(ListenerClass listener)
This method removes a listener from the event.

Parameters:
listener -

fire

void fire(SourceClass source,
          PayloadClass payload)
This method can be invoked to fire the EventCommand command for the source object.

Parameters:
source - The object for which the event is being fired.
payload - The semantic content of the event, in a payload object.


Copyright © 2013. All rights reserved.