Trait

diode

Circuit

Related Doc: package diode

Permalink

trait Circuit[M <: AnyRef] extends Dispatcher

Linear Supertypes
Dispatcher, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. Circuit
  2. Dispatcher
  3. AnyRef
  4. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Type Members

  1. type HandlerFunction = (M, Any) ⇒ Option[ActionResult[M]]

    Permalink

Abstract Value Members

  1. abstract def actionHandler: HandlerFunction

    Permalink

    Handles all dispatched actions

    Handles all dispatched actions

    Attributes
    protected
  2. abstract def initialModel: M

    Permalink

    Provides the initial value for the model

    Provides the initial value for the model

    Attributes
    protected

Concrete Value Members

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

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

    Permalink
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  4. def addProcessor(processor: ActionProcessor[M]): Unit

    Permalink

    Adds a new ActionProcessor[M] to the action processing chain.

    Adds a new ActionProcessor[M] to the action processing chain. The processor is called for every dispatched action.

  5. def apply[A](action: A)(implicit arg0: ActionType[A]): Unit

    Permalink
    Definition Classes
    Dispatcher
  6. final def asInstanceOf[T0]: T0

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

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  8. def composeHandlers(handlers: HandlerFunction*): HandlerFunction

    Permalink

    Composes multiple handlers into a single handler.

    Composes multiple handlers into a single handler. Processing stops as soon as a handler is able to handle the action. If none of them handle the action, None is returned

  9. def dispatch[A](action: A)(implicit arg0: ActionType[A]): Unit

    Permalink

    Dispatch the action, call change listeners when completed

    Dispatch the action, call change listeners when completed

    action

    Action to dispatch

    Definition Classes
    CircuitDispatcher
  10. def dispatchBase[A](action: A): Boolean

    Permalink

    Perform actual dispatching, without calling change listeners

    Perform actual dispatching, without calling change listeners

    Attributes
    protected
  11. final def eq(arg0: AnyRef): Boolean

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

    Permalink
    Definition Classes
    AnyRef → Any
  13. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  14. def foldHandlers(handlers: HandlerFunction*): HandlerFunction

    Permalink

    Folds multiple handlers into a single function so that each handler is called in turn and an updated model is passed on to the next handler.

    Folds multiple handlers into a single function so that each handler is called in turn and an updated model is passed on to the next handler. Returned ActionResult contains the final model and combined effects.

  15. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  16. def handleEffectProcessingError[A](action: A, error: Throwable): Unit

    Permalink

    action

    the action that caused the effects

    error

    the Exception that was encountered while processing the effects

  17. def handleError(msg: String): Unit

    Permalink

    Handle a non-fatal error, such as dispatching an action with no action handler.

    Handle a non-fatal error, such as dispatching an action with no action handler.

    msg

    Error message

  18. def handleFatal(action: Any, e: Throwable): Unit

    Permalink

    Handle a fatal error.

    Handle a fatal error. Override this function to do something with exceptions that occur while dispatching actions.

    action

    Action that caused the exception

    e

    Exception that was thrown

  19. def hashCode(): Int

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

    Permalink
    Definition Classes
    Any
  21. final def ne(arg0: AnyRef): Boolean

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

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

    Permalink
    Definition Classes
    AnyRef
  24. def removeProcessor(processor: ActionProcessor[M]): Unit

    Permalink

    Removes a previously added ActionProcessor[M] from the action processing chain.

  25. def subscribe[T](cursor: ModelR[M, T])(listener: (ModelRO[T]) ⇒ Unit): () ⇒ Unit

    Permalink

    Subscribes to listen to changes in the model.

    Subscribes to listen to changes in the model. By providing a cursor you can limit what part of the model must change for your listener to be called. If omitted, all changes result in a call.

    cursor

    Model reader returning the part of the model you are interested in.

    listener

    Function to be called when model is updated. The listener function gets the model reader as a parameter.

    returns

    A function to unsubscribe your listener

  26. final def synchronized[T0](arg0: ⇒ T0): T0

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

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

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

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

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  31. def zoom[T](get: (M) ⇒ T)(implicit feq: FastEq[_ >: T]): ModelR[M, T]

    Permalink

    Zoom into the model using the get function

    Zoom into the model using the get function

    get

    Function that returns the part of the model you are interested in

    returns

    A ModelR[T] giving you read-only access to part of the model

  32. def zoomFlatMap[F[_], A, B](fa: (M) ⇒ F[A])(f: (A) ⇒ F[B])(implicit monad: Monad[F], feq: FastEq[_ >: B]): ModelR[M, F[B]]

    Permalink
  33. def zoomFlatMapRW[F[_], A, B](fa: (M) ⇒ F[A])(f: (A) ⇒ F[B])(set: (M, F[B]) ⇒ M)(implicit monad: Monad[F], feq: FastEq[_ >: B]): ModelRW[M, F[B]]

    Permalink
  34. def zoomMap[F[_], A, B](fa: (M) ⇒ F[A])(f: (A) ⇒ B)(implicit monad: Monad[F], feq: FastEq[_ >: B]): ModelR[M, F[B]]

    Permalink
  35. def zoomMapRW[F[_], A, B](fa: (M) ⇒ F[A])(f: (A) ⇒ B)(set: (M, F[B]) ⇒ M)(implicit monad: Monad[F], feq: FastEq[_ >: B]): ModelRW[M, F[B]]

    Permalink
  36. def zoomRW[T](get: (M) ⇒ T)(set: (M, T) ⇒ M)(implicit feq: FastEq[_ >: T]): ModelRW[M, T]

    Permalink

    Zoom into the model using get and set functions

    Zoom into the model using get and set functions

    get

    Function that returns the part of the model you are interested in

    set

    Function that updates the part of the model you are interested in

    returns

    A ModelRW[T] giving you read/update access to part of the model

  37. macro def zoomTo[T](field: (M) ⇒ T): ModelRW[M, T]

    Permalink

Deprecated Value Members

  1. def combineHandlers(handlers: HandlerFunction*): HandlerFunction

    Permalink
    Annotations
    @deprecated
    Deprecated

    (Since version 0.5.1) Use composeHandlers or foldHandlers instead

Inherited from Dispatcher

Inherited from AnyRef

Inherited from Any

Ungrouped