Class

akka.persistence.multidc.javadsl

CommandHandlerBuilder

Related Doc: package javadsl

Permalink

final class CommandHandlerBuilder[Command, Event, State] extends SignalHandlerBuilder[Command, Event, State]

Mutable builder for Java CommandHandlers. Handling of commands are added with the match methods and finally a CommandHandler is created with CommandHandlerBuilder#build.

Match statements are appended and evaluated in order, the first one to match is used. If no match is found when evaluating the built CommandHandler for a given command a scala.MatchError is thrown.

Instances should not be created by user code but instead accessed through ReplicatedEntity#commandHandlerBuilder.

Linear Supertypes
SignalHandlerBuilder[Command, Event, State], AnyRef, Any
Type Hierarchy
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. CommandHandlerBuilder
  2. SignalHandlerBuilder
  3. AnyRef
  4. Any
Implicitly
  1. by any2stringadd
  2. by StringFormat
  3. by Ensuring
  4. by ArrowAssoc
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Value Members

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

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

    Permalink
    Definition Classes
    AnyRef → Any
  3. def +(other: String): String

    Permalink
    Implicit information
    This member is added by an implicit conversion from CommandHandlerBuilder[Command, Event, State] to any2stringadd[CommandHandlerBuilder[Command, Event, State]] performed by method any2stringadd in scala.Predef.
    Definition Classes
    any2stringadd
  4. def ->[B](y: B): (CommandHandlerBuilder[Command, Event, State], B)

    Permalink
    Implicit information
    This member is added by an implicit conversion from CommandHandlerBuilder[Command, Event, State] to ArrowAssoc[CommandHandlerBuilder[Command, Event, State]] performed by method ArrowAssoc in scala.Predef.
    Definition Classes
    ArrowAssoc
    Annotations
    @inline()
  5. final def ==(arg0: Any): Boolean

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

    Permalink
    Definition Classes
    Any
  7. def build(): CommandHandler[Command, Event, State]

    Permalink

    Build a command handler from the appended cases.

    Build a command handler from the appended cases. The returned handler will throw a scala.MatchError if applied to a command that has no defined match.

    The builder is reset to empty after build has been called.

    Definition Classes
    CommandHandlerBuilder → SignalHandlerBuilder
  8. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  9. def ensuring(cond: (CommandHandlerBuilder[Command, Event, State]) ⇒ Boolean, msg: ⇒ Any): CommandHandlerBuilder[Command, Event, State]

    Permalink
    Implicit information
    This member is added by an implicit conversion from CommandHandlerBuilder[Command, Event, State] to Ensuring[CommandHandlerBuilder[Command, Event, State]] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  10. def ensuring(cond: (CommandHandlerBuilder[Command, Event, State]) ⇒ Boolean): CommandHandlerBuilder[Command, Event, State]

    Permalink
    Implicit information
    This member is added by an implicit conversion from CommandHandlerBuilder[Command, Event, State] to Ensuring[CommandHandlerBuilder[Command, Event, State]] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  11. def ensuring(cond: Boolean, msg: ⇒ Any): CommandHandlerBuilder[Command, Event, State]

    Permalink
    Implicit information
    This member is added by an implicit conversion from CommandHandlerBuilder[Command, Event, State] to Ensuring[CommandHandlerBuilder[Command, Event, State]] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  12. def ensuring(cond: Boolean): CommandHandlerBuilder[Command, Event, State]

    Permalink
    Implicit information
    This member is added by an implicit conversion from CommandHandlerBuilder[Command, Event, State] to Ensuring[CommandHandlerBuilder[Command, Event, State]] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  13. final def eq(arg0: AnyRef): Boolean

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

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

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  16. def formatted(fmtstr: String): String

    Permalink
    Implicit information
    This member is added by an implicit conversion from CommandHandlerBuilder[Command, Event, State] to StringFormat[CommandHandlerBuilder[Command, Event, State]] performed by method StringFormat in scala.Predef.
    Definition Classes
    StringFormat
    Annotations
    @inline()
  17. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  18. def hashCode(): Int

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

    Permalink
    Definition Classes
    Any
  20. def matchAny(commandToEffect: CommandToEffect[Command, Event, State]): CommandHandler[Command, Event, State]

    Permalink

    Match any command

    Match any command

    Builds and returns the handler since this will not let through any command to subsequent match statements

  21. def matchCommand[C <: Command](commandClass: Class[C], predicate: TypedPredicate[C], commandToEffect: CommandToEffect[C, Event, State]): CommandHandlerBuilder[Command, Event, State]

    Permalink

    Match any command which is an instance or a subtype of commandClass and which the given predicate returns true for.

    Match any command which is an instance or a subtype of commandClass and which the given predicate returns true for.

    Throws java.lang.IllegalArgumentException if commandClass is not a subtype of the root Command this builder was created with

  22. def matchCommand[C <: Command](commandClass: Class[C], commandToEffect: CommandToEffect[C, Event, State]): CommandHandlerBuilder[Command, Event, State]

    Permalink

    Match any command which is an instance or a subtype of commandClass

    Match any command which is an instance or a subtype of commandClass

    Throws java.lang.IllegalArgumentException if commandClass is not a subtype of the root Command this builder was created with

  23. def matchCommand(predicate: TypedPredicate[Command], commandToEffect: CommandToEffect[Command, Event, State]): CommandHandlerBuilder[Command, Event, State]

    Permalink

    Match any command which the given predicate returns true for

  24. def matchExactCommand[C <: Command](exactly: C, commandToEffect: CommandToEffect[C, Event, State]): CommandHandlerBuilder[Command, Event, State]

    Permalink

    Match any command which equals exactly

    Match any command which equals exactly

    Throws java.lang.IllegalArgumentException if exactly is not a subtype of the root Command this builder was created with

  25. final def ne(arg0: AnyRef): Boolean

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

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

    Permalink
    Definition Classes
    AnyRef
  28. final def onReceiveTimeout(handler: SignalHandler[ReceiveTimeout, Event, State]): SignalHandlerBuilder[Command, Event, State]

    Permalink

    Register message handler for ReceiveTimeout messages.

    Register message handler for ReceiveTimeout messages. If a handler for ReceiveTimeout messages was previously defined this will replace the previous handler.

    Definition Classes
    SignalHandlerBuilder
  29. final def onTerminated(handler: SignalHandler[Terminated, Event, State]): SignalHandlerBuilder[Command, Event, State]

    Permalink

    Register message handler for Terminated messages.

    Register message handler for Terminated messages. If a handler for Terminated messages was previously defined this will replace the previous handler.

    Definition Classes
    SignalHandlerBuilder
  30. final def onTimer[M](messageClass: Class[M], handler: SignalHandler[M, Event, State]): SignalHandlerBuilder[Command, Event, State]

    Permalink

    Register message handler for timer messages.

    Register message handler for timer messages. Timers are started through getTimers on akka.persistence.multidc.javadsl.ReplicatedEntity#ActorContext. Adding a handler for a timer message class that was previously defined will replace the previous handler for that class.

    Definition Classes
    SignalHandlerBuilder
  31. final def synchronized[T0](arg0: ⇒ T0): T0

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

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

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

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

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  36. def [B](y: B): (CommandHandlerBuilder[Command, Event, State], B)

    Permalink
    Implicit information
    This member is added by an implicit conversion from CommandHandlerBuilder[Command, Event, State] to ArrowAssoc[CommandHandlerBuilder[Command, Event, State]] performed by method ArrowAssoc in scala.Predef.
    Definition Classes
    ArrowAssoc

Inherited from SignalHandlerBuilder[Command, Event, State]

Inherited from AnyRef

Inherited from Any

Inherited by implicit conversion any2stringadd from CommandHandlerBuilder[Command, Event, State] to any2stringadd[CommandHandlerBuilder[Command, Event, State]]

Inherited by implicit conversion StringFormat from CommandHandlerBuilder[Command, Event, State] to StringFormat[CommandHandlerBuilder[Command, Event, State]]

Inherited by implicit conversion Ensuring from CommandHandlerBuilder[Command, Event, State] to Ensuring[CommandHandlerBuilder[Command, Event, State]]

Inherited by implicit conversion ArrowAssoc from CommandHandlerBuilder[Command, Event, State] to ArrowAssoc[CommandHandlerBuilder[Command, Event, State]]

Ungrouped