c

com.codedx.util

EventHandlerRegistry

class EventHandlerRegistry[S] extends AnyRef

An instance of this class is able to register "EventHandlers" and dispatch events to them. Events will be dispatched to handlers in the order they were added. In addition to the event itself, a scope (e.g. a Transaction) can be provided to the handler.

S

The scope type

Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. EventHandlerRegistry
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Instance Constructors

  1. new EventHandlerRegistry()

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##: Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  5. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @native()
  6. def dispatch[E](event: E, scope: S): EventHandlerAction

    Dispatch an event to all event handlers that have previously been registered.

    Dispatch an event to all event handlers that have previously been registered.

    Each event handler may choose to "interrupt" the event. If any handler does so, the event will not be passed to any handlers that were registered after the interrupting handler, and this method will return the Interrupt action. As long as each handler returns the Continue action, the event will be passed to all registered handlers and this method will return Continue.

    E

    The event type

    event

    The event, which will be passed to each event handler

    scope

    The current scope value, e.g. a Transaction, which will be passed to each event handler

    returns

    If any handler returned Interrupt, this method will return Interrupt. Otherwise, Continue.

  7. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  8. def equals(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef → Any
  9. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.Throwable])
  10. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  11. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  12. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  13. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  14. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  15. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  16. def register[E](handler: EventHandler[E, S])(implicit arg0: ClassTag[E]): EventSubscription

    Register an EventHandler to be run in response to events of type E that are dispatched.

    Register an EventHandler to be run in response to events of type E that are dispatched. Event handlers are run in the order they are added, each time an event is dispatched.

    E

    The event type

    handler

    The event handler

    returns

    A function that can be called to deactivate the registration

  17. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  18. def toString(): String
    Definition Classes
    AnyRef → Any
  19. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  20. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  21. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()

Inherited from AnyRef

Inherited from Any

Ungrouped