Class

org.powerscala.event.processor

EitherProcessor

Related Doc: package processor

Permalink

class EitherProcessor[E, R] extends EventProcessor[E, Either[E, R], Either[E, R]]

EitherProcessor takes in an event and allows each listener the option to modify and return via Left or respond with an alternate response with Right (immediately stops propagating and returns).

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

Instance Constructors

  1. new EitherProcessor(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, Either[E, R]]): Unit

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

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

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

    Permalink
    Definition Classes
    EventProcessor
  7. def and[NE >: E, NV >: Either[E, R], NR >: Either[E, 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) ⇒ Either[E, R]): FunctionalListener[E, Either[E, 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
    EitherProcessorEventProcessor
  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): Either[E, 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: Either[E, R], state: EventState[E]): Unit

    Permalink
    Attributes
    protected
    Definition Classes
    EitherProcessorEventProcessor
  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) ⇒ Either[E, R]): FunctionalListener[E, Either[E, R]]

    Permalink
    Definition Classes
    EventProcessor
  26. implicit val listenable: Listenable

    Permalink
    Definition Classes
    EitherProcessorEventProcessor
  27. val name: String

    Permalink
    Definition Classes
    EitherProcessorEventProcessor
  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) ⇒ Either[E, R], priority: Priority = Priority.Normal): FunctionalListener[E, Either[E, R]]

    Permalink
    Definition Classes
    EventProcessor
  32. def once(f: (E) ⇒ Either[E, R], priority: Priority = Priority.Normal): Listener[E, Either[E, 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: Either[E, R], priority: Priority = Priority.Normal)(f: (E) ⇒ Option[Either[E, R]]): Listener[E, Either[E, 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: Either[E, R], priority: Priority = Priority.Normal)(f: PartialFunction[E, Either[E, R]]): FunctionalListener[E, Either[E, R]]

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

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

    Permalink
    Attributes
    protected
    Definition Classes
    EitherProcessorEventProcessor
  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, Either[E, R], Either[E, R]]

Inherited from AnyRef

Inherited from Any

Ungrouped