abstract class CommandContext[R] extends ReadOnlyCommandContext[R]
The context that is used by command handler function. Events are persisted with the context and replies are sent with the context.
- R
the reply type of the command
- Source
- PersistentEntity.scala
- Alphabetic
- By Inheritance
- CommandContext
- ReadOnlyCommandContext
- AnyRef
- Any
- by any2stringadd
- by StringFormat
- by Ensuring
- by ArrowAssoc
- Hide All
- Show All
- Public
- All
Instance Constructors
- new CommandContext()
Abstract Value Members
-
abstract
def
commandFailed(cause: Throwable): Unit
Reply with a negative acknowledgment.
Reply with a negative acknowledgment.
- Definition Classes
- ReadOnlyCommandContext
-
abstract
def
reply(msg: R): Unit
Send reply to a command.
Send reply to a command. The type
R
must be the reply type defined by the command.- Definition Classes
- ReadOnlyCommandContext
Concrete Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
def
+(other: String): String
- Implicit
- This member is added by an implicit conversion from CommandContext[R] to any2stringadd[CommandContext[R]] performed by method any2stringadd in scala.Predef.
- Definition Classes
- any2stringadd
-
def
->[B](y: B): (CommandContext[R], B)
- Implicit
- This member is added by an implicit conversion from CommandContext[R] to ArrowAssoc[CommandContext[R]] performed by method ArrowAssoc in scala.Predef.
- Definition Classes
- ArrowAssoc
- Annotations
- @inline()
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()
-
def
done[B <: Event]: Persist
A command handler may return this
Persist
directive to define that no events are to be persisted. -
def
ensuring(cond: (CommandContext[R]) ⇒ Boolean, msg: ⇒ Any): CommandContext[R]
- Implicit
- This member is added by an implicit conversion from CommandContext[R] to Ensuring[CommandContext[R]] performed by method Ensuring in scala.Predef.
- Definition Classes
- Ensuring
-
def
ensuring(cond: (CommandContext[R]) ⇒ Boolean): CommandContext[R]
- Implicit
- This member is added by an implicit conversion from CommandContext[R] to Ensuring[CommandContext[R]] performed by method Ensuring in scala.Predef.
- Definition Classes
- Ensuring
-
def
ensuring(cond: Boolean, msg: ⇒ Any): CommandContext[R]
- Implicit
- This member is added by an implicit conversion from CommandContext[R] to Ensuring[CommandContext[R]] performed by method Ensuring in scala.Predef.
- Definition Classes
- Ensuring
-
def
ensuring(cond: Boolean): CommandContext[R]
- Implicit
- This member is added by an implicit conversion from CommandContext[R] to Ensuring[CommandContext[R]] performed by method Ensuring in scala.Predef.
- Definition Classes
- Ensuring
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
-
def
formatted(fmtstr: String): String
- Implicit
- This member is added by an implicit conversion from CommandContext[R] to StringFormat[CommandContext[R]] performed by method StringFormat in scala.Predef.
- Definition Classes
- StringFormat
- Annotations
- @inline()
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
def
invalidCommand(message: String): Unit
Reply with a negative acknowledgment using the standard
InvalidCommandException
.Reply with a negative acknowledgment using the standard
InvalidCommandException
.- Definition Classes
- ReadOnlyCommandContext
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
thenPersist[B <: Event](event: B)(afterPersist: (B) ⇒ Unit = (_: B) => ()): Persist
A command handler may return this
Persist
directive to define that one event is to be persisted.A command handler may return this
Persist
directive to define that one event is to be persisted. External side effects can be performed after successful persist in theafterPersist
function. -
def
thenPersistAll(events: Event*)(afterPersist: () ⇒ Unit = () => ()): Persist
A command handler may return this
Persist
directive to define that several events are to be persisted.A command handler may return this
Persist
directive to define that several events are to be persisted. External side effects can be performed after successful persist in theafterPersist
function.afterPersist
is invoked once when all events have been persisted successfully. Events will be persisted atomically and in the same order as they are passed here. -
def
toString(): String
- Definition Classes
- AnyRef → Any
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()
-
def
→[B](y: B): (CommandContext[R], B)
- Implicit
- This member is added by an implicit conversion from CommandContext[R] to ArrowAssoc[CommandContext[R]] performed by method ArrowAssoc in scala.Predef.
- Definition Classes
- ArrowAssoc