object StatusReply
- Source
- StatusReply.scala
- Alphabetic
- By Inheritance
- StatusReply
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Type Members
- final case class ErrorMessage(errorMessage: String) extends RuntimeException with NoStackTrace with Product with Serializable
Carrier exception used for textual error descriptions.
Carrier exception used for textual error descriptions.
Not meant for usage outside of StatusReply.
Value Members
- val Ack: StatusReply[Done]
Scala API: A general purpose message for using as an Ack
- def ack(): StatusReply[Done]
Java API: A general purpose message for using as an Ack
- def error[T](exception: Throwable): StatusReply[T]
Java API: Create an error response with a user defined Throwable.
Java API: Create an error response with a user defined Throwable.
Prefer the string based error response over this one when possible to avoid tightly coupled logic across actors and passing internal failure details on to callers that can not do much to handle them.
For cases where types are needed to identify errors and behave differently enumerating them with a specific set of response messages may be a better alternative to encoding them as generic exceptions.
Also note that Akka does not contain pre-build serializers for arbitrary exceptions.
- def error[T](errorMessage: String): StatusReply[T]
Java API: Create an status response with a error message describing why the request was failed or denied.
- def success[T](value: T): StatusReply[T]
Java API: Create a successful reply containing
value
- object Error
Scala API for creating and pattern matching an error response
Scala API for creating and pattern matching an error response
For example:
case StatusReply.Error(exception) => ...
- object Success
Scala API for creation and pattern matching a successful response.
Scala API for creation and pattern matching a successful response.
For example:
case StatusReply.Success(value: String) => ...