org.objectweb.jotm.core.events
Interface EventSource

All Known Subinterfaces:
BasicTransaction, TwoPhaseCommitTransaction
All Known Implementing Classes:
CoreTransaction

public interface EventSource

Event source is the source of various event types. Listeners of such event types have to register using the addListener(int, org.objectweb.jotm.core.events.EventListener) method to receive event of the specified type. It is expected that the event type values are bitwise disjoint, in order to make it possible to add a listener of multiple events by passing bitwise or of the respective event type values.


Method Summary
 void addListener(int eventType, EventListener listener)
          Register listener
 void removeListener(int eventType, EventListener listener)
          Unregister listener
 

Method Detail

addListener

public void addListener(int eventType,
                        EventListener listener)
Register listener

Parameters:
eventType - type of events to be delivered to the listener
listener - listener that will receive events of the specified type

removeListener

public void removeListener(int eventType,
                           EventListener listener)
Unregister listener

Parameters:
eventType - type of events that are delivered to the listener
listener - listener that receives events of the specified type