Interface IEvent

All Known Subinterfaces:
IInstanceEvent, ITransactionEvent, IValueEvent
All Known Implementing Classes:
InstanceEvent, TransactionEvent, TxInstanceEvent, TxValueEvent, ValueEvent

public interface IEvent
Base interface for all event classes.
Since:
5.0
Author:
O. Kerpershoek
  • Method Summary

    Modifier and Type
    Method
    Description
    int
    This method will return the type of the event.
    void
    The invoke event hook method will be triggered for every listener that is registered to receive events.
  • Method Details

    • getType

      int getType()
      This method will return the type of the event. The type of the event is used to determine which event listeners should be invoked.
      Returns:
      The type of the event.
    • invokeEventHook

      void invokeEventHook(IEventListener listener)
      The invoke event hook method will be triggered for every listener that is registered to receive events. The event class that implements this interface should check if the listener that is passed as argument supports this event, and invoke the correct method of the listener to notify the listener.
      For example: A context switch event can check if the listener contains a method 'onContextSwitch' and invoke that method when found.
      Parameters:
      listener - IEventListener that should be notified of the event.