Class/Object

io.funcqrs.behavior

Actions

Related Docs: object Actions | package behavior

Permalink

case class Actions[A <: AggregateLike](cmdHandlerInvokers: CommandHandlerToInvoker[ProtocolAliases.Protocol.ProtocolCommand, ProtocolAliases.Protocol.ProtocolEvent] = PartialFunction.empty, rejectCmdInvokers: CommandHandlerToInvoker[ProtocolAliases.Protocol.ProtocolCommand, ProtocolAliases.Protocol.ProtocolEvent] = PartialFunction.empty, eventHandlers: EventHandler[ProtocolAliases.Protocol.ProtocolEvent, A] = PartialFunction.empty) extends AggregateAliases with Product with Serializable

Linear Supertypes
Serializable, Serializable, Product, Equals, AggregateAliases, ProtocolAliases, AnyRef, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. Actions
  2. Serializable
  3. Serializable
  4. Product
  5. Equals
  6. AggregateAliases
  7. ProtocolAliases
  8. AnyRef
  9. Any
  1. Hide All
  2. Show all
Visibility
  1. Public
  2. All

Instance Constructors

  1. new Actions(cmdHandlerInvokers: CommandHandlerToInvoker[ProtocolAliases.Protocol.ProtocolCommand, ProtocolAliases.Protocol.ProtocolEvent] = PartialFunction.empty, rejectCmdInvokers: CommandHandlerToInvoker[ProtocolAliases.Protocol.ProtocolCommand, ProtocolAliases.Protocol.ProtocolEvent] = PartialFunction.empty, eventHandlers: EventHandler[ProtocolAliases.Protocol.ProtocolEvent, A] = PartialFunction.empty)

    Permalink

Type Members

  1. type Aggregate = A

    Permalink

    The Aggregate type.

    The Aggregate type. This is the only (abstract) type member to be defined.

    All other type members are aliases defined by type projection of inner types from Aggregate type itself.

    Definition Classes
    ActionsAggregateAliases
  2. type Command = ProtocolAliases.Protocol.ProtocolCommand

    Permalink

    Alias for Aggregate's ProtocolCommand

    Alias for Aggregate's ProtocolCommand

    Definition Classes
    ProtocolAliases
  3. type Event = ProtocolAliases.Protocol.ProtocolEvent

    Permalink

    Alias for Aggregate's ProtocolEvent

    Alias for Aggregate's ProtocolEvent

    Definition Classes
    ProtocolAliases
  4. type Events = Seq[Event]

    Permalink

    Alias for an immutable Seq of Aggregate's ProtocolEvent

    Alias for an immutable Seq of Aggregate's ProtocolEvent

    Definition Classes
    ProtocolAliases
  5. case class FutureManyEventsBinder(behavior: Actions[A]) extends ManyEventsBinder[Future] with Product with Serializable

    Permalink
  6. type Id = A.Id

    Permalink

    Alias for Aggregate#Id

    Alias for Aggregate#Id

    Definition Classes
    AggregateAliases
  7. case class IdentityManyEventsBinder(behavior: Actions[A]) extends ManyEventsBinder[Identity] with Product with Serializable

    Permalink
  8. trait ManyEventsBinder[F[_]] extends AnyRef

    Permalink
  9. type Protocol = A.Protocol

    Permalink

    Alias for Aggregate#Protocol

    Alias for Aggregate#Protocol

    Definition Classes
    AggregateAliasesProtocolAliases
  10. case class TryManyEventsBinder(behavior: Actions[A]) extends ManyEventsBinder[Try] with Product with Serializable

    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 ++(that: Actions[A]): Actions[A]

    Permalink

    Concatenate this Actions with that Actions

  4. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  5. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  6. def canHandleEvent(event: Event): Boolean

    Permalink

    Check if the passed Event can be handled by this Actions instance

    Check if the passed Event can be handled by this Actions instance

    INTERNAL API This method is used to prevent that Events that can't be handle are stored.

  7. def canHandleEvents(events: Events): Boolean

    Permalink

    Check if the passed Events can be handled by this Actions instance

    Check if the passed Events can be handled by this Actions instance

    INTERNAL API This method is used to prevent that Events that can't be handle are stored.

  8. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  9. val cmdHandlerInvokers: CommandHandlerToInvoker[ProtocolAliases.Protocol.ProtocolCommand, ProtocolAliases.Protocol.ProtocolEvent]

    Permalink
  10. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  11. val eventHandlers: EventHandler[ProtocolAliases.Protocol.ProtocolEvent, A]

    Permalink
  12. def fallbackInvoker(msg: String): CommandHandlerInvoker[Command, Event]

    Permalink

    Build a TryCommandHandlerInvoker that will always return an Failure Used internally to handle unknown commands

  13. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  14. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  15. def handleCommand: ManyEventsBinder[Identity]

    Permalink

  16. def handleCommand[C <: Command, E <: Event](cmdHandler: (C) ⇒ Identity[E])(implicit arg0: ClassTag[C]): Actions[Aggregate]

    Permalink

    Declares a Command Handler that produces one single Event

  17. def handleCommandAsync: ManyEventsBinder[Future]

    Permalink
  18. def handleCommandAsync[C <: Command, E <: Event](cmdHandler: (C) ⇒ Future[E])(implicit arg0: ClassTag[C]): Actions[Aggregate]

    Permalink
  19. def handleEvent[E <: Event](eventHandler: (E) ⇒ A)(implicit arg0: ClassTag[E]): Actions[Aggregate]

    Permalink

    Declares an event handler

    Declares an event handler

    eventHandler

    - the event handler function

    returns

    an Actions for A

  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 onCommand(cmd: Command): CommandHandlerInvoker[Command, Event]

    Permalink

    Returns a CommandHandlerInvoker for the passed Command.

    Returns a CommandHandlerInvoker for the passed Command. Invokers are delayed execution of Command Handlers and abstract over the Functor that will be returned when handling the command.

    Internally, this method calls the declared Command Handlers.

  25. def onEvent(evt: Event): Aggregate

    Permalink

    Applies the passed Event producing a new instance of Aggregate.

    Applies the passed Event producing a new instance of Aggregate. Internally, this method calls the declared Event Handlers.

  26. def reject(cmdHandler: PartialFunction[ProtocolAliases.Protocol.ProtocolCommand, Throwable]): Actions[Aggregate]

    Permalink

    Declares a guard clause that reject commands that fulfill a given condition.

    Declares a guard clause that reject commands that fulfill a given condition.

    A guard clause is a Command Handler as it handles a incoming command, but instead of producing Event, it returns a Throwable to signalize an error condition.

    Guard clauses command handlers have predecence over handlers producting Events.

    cmdHandler

    - a PartialFunction from Command to Throwable.

    returns

    - return a Actions.

  27. val rejectCmdInvokers: CommandHandlerToInvoker[ProtocolAliases.Protocol.ProtocolCommand, ProtocolAliases.Protocol.ProtocolEvent]

    Permalink
  28. def rejectCommand(cmdHandler: PartialFunction[Command, Throwable]): Actions[Aggregate]

    Permalink

    Alias for reject

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

    Permalink
    Definition Classes
    AnyRef
  30. def tryToHandleCommand: ManyEventsBinder[Try]

    Permalink
  31. def tryToHandleCommand[C <: Command, E <: Event](cmdHandler: (C) ⇒ Try[E])(implicit arg0: ClassTag[C]): Actions[Aggregate]

    Permalink
  32. final def wait(): Unit

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

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

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

Deprecated Value Members

  1. def asyncHandler: ManyEventsBinder[Future]

    Permalink
    Annotations
    @deprecated
    Deprecated

    (Since version 0.3.1) Use handleCommandAsync instead

  2. def asyncHandler[C <: Command, E <: Event](cmdHandler: (C) ⇒ Future[E])(implicit arg0: ClassTag[C]): Actions[Aggregate]

    Permalink
    Annotations
    @deprecated
    Deprecated

    (Since version 0.3.1) Use handleCommandAsync instead

  3. def handler: ManyEventsBinder[Identity]

    Permalink
    Annotations
    @deprecated
    Deprecated

    (Since version 0.3.1) Use handleCommand instead

  4. def handler[C <: Command, E <: Event](cmdHandler: (C) ⇒ Identity[E])(implicit arg0: ClassTag[C]): Actions[Aggregate]

    Permalink
    Annotations
    @deprecated
    Deprecated

    (Since version 0.3.1) Use handleCommand instead

  5. def listener[E <: Event](eventHandler: (E) ⇒ A)(implicit arg0: ClassTag[E]): Actions[Aggregate]

    Permalink
    Annotations
    @deprecated
    Deprecated

    (Since version 0.3.1) Use handleEvent instead

  6. def tryHandler: ManyEventsBinder[Try]

    Permalink
    Annotations
    @deprecated
    Deprecated

    (Since version 0.3.1) Use tryToHandleCommand instead

  7. def tryHandler[C <: Command, E <: Event](cmdHandler: (C) ⇒ Try[E])(implicit arg0: ClassTag[C]): Actions[Aggregate]

    Permalink
    Annotations
    @deprecated
    Deprecated

    (Since version 0.3.1) Use tryToHandleCommand instead

Inherited from Serializable

Inherited from Serializable

Inherited from Product

Inherited from Equals

Inherited from AggregateAliases

Inherited from ProtocolAliases

Inherited from AnyRef

Inherited from Any

Ungrouped