Class

org.powerscala.event.processor

OptionProcessor

Related Doc: package processor

Permalink

class OptionProcessor[E, R] extends EventProcessor[E, Option[R], Option[R]]

OptionProcessor gives each listener the ability to return Option[R]. If Some is returned no more listeners will be invoked for the event and it will return immediately. If all listeners return None or there are no listeners, then None will be the result.

Linear Supertypes
EventProcessor[E, Option[R], Option[R]], AnyRef, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. OptionProcessor
  2. EventProcessor
  3. AnyRef
  4. Any
  1. Hide All
  2. Show all
Visibility
  1. Public
  2. All

Instance Constructors

  1. new OptionProcessor(name: String)(implicit listenable: Listenable, eventManifest: Manifest[E])

    Permalink

Value Members

  1. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. def +=(listener: Listener[E, Option[R]]): Unit

    Permalink
    Definition Classes
    EventProcessor
  4. def -=(listener: Listener[E, Option[R]]): Unit

    Permalink
    Definition Classes
    EventProcessor
  5. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  6. def add(listener: Listener[E, Option[R]]): Unit

    Permalink
    Definition Classes
    EventProcessor
  7. def and[NE >: E, NV >: Option[R], NR >: Option[R]](processor: EventProcessor[NE, NV, NR]): ProcessorGroup[NE, NV, NR]

    Permalink
    Definition Classes
    EventProcessor
  8. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  9. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  10. def create(priority: Priority, modes: ListenMode*)(f: (E) ⇒ Option[R]): FunctionalListener[E, Option[R]]

    Permalink

    Creates the listener but does not add it.

    Creates the listener but does not add it.

    priority

    the priority of this listener

    modes

    the modes the listener should listen to. If this is empty it will be set to EventProcessor.DefaultModes.

    f

    the function to invoke when the listener is invoked.

    returns

    Listener

    Definition Classes
    EventProcessor
  11. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  12. def equals(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  13. implicit val eventManifest: Manifest[E]

    Permalink
    Definition Classes
    OptionProcessorEventProcessor
  14. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  15. def fire(event: E, mode: ListenMode = ListenMode.Standard): Option[R]

    Permalink
    Definition Classes
    EventProcessor
  16. def fireAdditional(state: EventState[E], mode: ListenMode, listenable: Listenable): Unit

    Permalink

    Allows extending classes to continue processing on additional listeners if needed before a response is determined and sent back to the caller.

    Allows extending classes to continue processing on additional listeners if needed before a response is determined and sent back to the caller.

    state

    the current EventState

    mode

    the current ListenMode

    listenable

    the current Listenable

    Attributes
    protected
    Definition Classes
    EventProcessor
  17. def fireInternal(state: EventState[E], mode: ListenMode, listenable: Listenable): Unit

    Permalink
    Attributes
    protected
    Definition Classes
    EventProcessor
  18. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  19. def handleListenerResponse(value: Option[R], state: EventState[E]): Unit

    Permalink
    Attributes
    protected
    Definition Classes
    OptionProcessorEventProcessor
  20. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  21. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  22. def isListenerTypeValid(state: EventState[E], listener: Listener[_, _]): Boolean

    Permalink
    Attributes
    protected
    Definition Classes
    EventProcessor
  23. def isModeValid(listener: Listener[_, _], mode: ListenMode): Boolean

    Permalink
    Attributes
    protected
    Definition Classes
    EventProcessor
  24. def isNameValid(listener: Listener[_, _]): Boolean

    Permalink
    Attributes
    protected
    Definition Classes
    EventProcessor
  25. def listen(priority: Priority, modes: ListenMode*)(f: (E) ⇒ Option[R]): FunctionalListener[E, Option[R]]

    Permalink
    Definition Classes
    EventProcessor
  26. implicit val listenable: Listenable

    Permalink
    Definition Classes
    OptionProcessorEventProcessor
  27. val name: String

    Permalink
    Definition Classes
    OptionProcessorEventProcessor
  28. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  29. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  30. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  31. def on(f: (E) ⇒ Option[R], priority: Priority = Priority.Normal): FunctionalListener[E, Option[R]]

    Permalink
    Definition Classes
    EventProcessor
  32. def once(f: (E) ⇒ Option[R], priority: Priority = Priority.Normal): Listener[E, Option[R]]

    Permalink

    Works similarly to on but after the first event is received the listener is removed.

    Works similarly to on but after the first event is received the listener is removed.

    f

    the function to invoke upon event.

    returns

    listener

    Definition Classes
    EventProcessor
  33. def onceConditional(default: Option[R], priority: Priority = Priority.Normal)(f: (E) ⇒ Option[Option[R]]): Listener[E, Option[R]]

    Permalink

    Invokes the function upon each event until it returns Some[V] and then removes the listener from receiving any other invocations.

    Invokes the function upon each event until it returns Some[V] and then removes the listener from receiving any other invocations.

    default

    the default value to send if None is returned by the function.

    priority

    the priority for this listener. Defaults to Normal.

    f

    the function to invoke upon event.

    returns

    Listener[E, V, R]

    Definition Classes
    EventProcessor
  34. def partial(default: Option[R], priority: Priority = Priority.Normal)(f: PartialFunction[E, Option[R]]): FunctionalListener[E, Option[R]]

    Permalink
    Definition Classes
    EventProcessor
  35. def remove(listener: Listener[E, Option[R]]): Unit

    Permalink
    Definition Classes
    EventProcessor
  36. def responseFor(state: EventState[E]): Option[R]

    Permalink
    Attributes
    protected
    Definition Classes
    OptionProcessorEventProcessor
  37. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  38. def toString(): String

    Permalink
    Definition Classes
    AnyRef → Any
  39. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  40. final def wait(arg0: Long, arg1: Int): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  41. final def wait(arg0: Long): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from EventProcessor[E, Option[R], Option[R]]

Inherited from AnyRef

Inherited from Any

Ungrouped