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
- Alphabetic
- By Inheritance
- EventHandlerRegistry
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Instance Constructors
- new EventHandlerRegistry()
Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##: Int
- Definition Classes
- AnyRef → Any
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native()
- 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 theContinue
action, the event will be passed to all registered handlers and this method will returnContinue
.- 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 returnInterrupt
. Otherwise,Continue
.
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable])
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- 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 aredispatch
ed.Register an EventHandler to be run in response to events of type
E
that aredispatch
ed. 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
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def toString(): String
- Definition Classes
- AnyRef → Any
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()