t

diode

Circuit

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]]

Abstract Value Members

  1. abstract def actionHandler: HandlerFunction

    Handles all dispatched actions

    Handles all dispatched actions

    Attributes
    protected
  2. abstract def initialModel: M

    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
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. def addProcessor(processor: ActionProcessor[M]): Unit

    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
    Definition Classes
    Dispatcher
  6. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  7. def clone(): AnyRef
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  8. def composeHandlers(handlers: HandlerFunction*): HandlerFunction

    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

    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

    Perform actual dispatching, without calling change listeners

    Perform actual dispatching, without calling change listeners

    Attributes
    protected
  11. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  12. def equals(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  13. def finalize(): Unit
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  14. def foldHandlers(handlers: HandlerFunction*): HandlerFunction

    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[_]
    Definition Classes
    AnyRef → Any
  16. def handleError(msg: String): Unit

    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

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

    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

  18. def hashCode(): Int
    Definition Classes
    AnyRef → Any
  19. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  20. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  21. final def notify(): Unit
    Definition Classes
    AnyRef
  22. final def notifyAll(): Unit
    Definition Classes
    AnyRef
  23. def removeProcessor(processor: ActionProcessor[M]): Unit

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

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

    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

  25. final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
    AnyRef
  26. def toString(): String
    Definition Classes
    AnyRef → Any
  27. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  28. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  29. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  30. def zoom[T](get: (M) ⇒ T)(implicit feq: FastEq[_ >: T]): ModelR[M, T]

    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

  31. def zoomFlatMap[F[_], A, B](fa: (M) ⇒ F[A])(f: (A) ⇒ F[B])(implicit monad: Monad[F], feq: FastEq[_ >: B]): ModelR[M, F[B]]
  32. 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]]
  33. def zoomMap[F[_], A, B](fa: (M) ⇒ F[A])(f: (A) ⇒ B)(implicit monad: Monad[F], feq: FastEq[_ >: B]): ModelR[M, F[B]]
  34. 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]]
  35. def zoomRW[T](get: (M) ⇒ T)(set: (M, T) ⇒ M)(implicit feq: FastEq[_ >: T]): ModelRW[M, T]

    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

Deprecated Value Members

  1. def combineHandlers(handlers: HandlerFunction*): HandlerFunction
    Annotations
    @deprecated
    Deprecated

    (Since version 0.5.1) Use composeHandlers or foldHandlers instead

Inherited from Dispatcher

Inherited from AnyRef

Inherited from Any

Ungrouped