Package org.apache.pekko.pattern
Class StatusReply$
java.lang.Object
org.apache.pekko.pattern.StatusReply$
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StatusReply$
Static reference to the singleton instance of this Scala object. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionack()
Java API: A general purpose message for using as an AckAck()
Scala API: A general purpose message for using as an Ack<T> StatusReply<T>
Java API: Create an status response with a error message describing why the request was failed or denied.<T> StatusReply<T>
Java API: Create an error response with a user definedThrowable
.<T> StatusReply<T>
success
(T value) Java API: Create a successful reply containingvalue
-
Field Details
-
MODULE$
Static reference to the singleton instance of this Scala object.
-
-
Constructor Details
-
StatusReply$
public StatusReply$()
-
-
Method Details
-
Ack
Scala API: A general purpose message for using as an Ack -
ack
Java API: A general purpose message for using as an Ack -
success
Java API: Create a successful reply containingvalue
-
error
Java API: Create an status response with a error message describing why the request was failed or denied. -
error
Java API: Create an error response with a user definedThrowable
.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 Pekko does not contain pre-build serializers for arbitrary exceptions.
-