Packages

object StatusReply

Source
StatusReply.scala
Linear Supertypes
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. StatusReply
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Type Members

  1. 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

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##: Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. val Ack: StatusReply[Done]

    Scala API: A general purpose message for using as an Ack

  5. def ack(): StatusReply[Done]

    Java API: A general purpose message for using as an Ack

  6. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  7. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @IntrinsicCandidate() @native()
  8. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  9. def equals(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef → Any
  10. def error[T](exception: Throwable): StatusReply[T]

    Java API: Create an error response with a user defined java.lang.Throwable.

    Java API: Create an error response with a user defined java.lang.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 Pekko does not contain pre-built serializers for arbitrary exceptions.

  11. 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.

  12. def fromCallable[T](callable: Callable[T]): StatusReply[T]

    Java API: Convert the result of a java.util.concurrent.Callable into a StatusReply.

    Java API: Convert the result of a java.util.concurrent.Callable into a StatusReply.

    If the callable completes successfully, wraps the result in a successful reply. If it throws an exception, converts the exception message to an error reply (discarding the original exception type, making it safe for remote serialization).

    This is the Java-friendly equivalent of #fromTry.

    Since

    2.0.0

  13. def fromCallableKeepException[T](callable: Callable[T]): StatusReply[T]

    Java API: Convert the result of a java.util.concurrent.Callable into a StatusReply, keeping the original exception in case of failure.

    Java API: Convert the result of a java.util.concurrent.Callable into a StatusReply, keeping the original exception in case of failure.

    Unlike #fromCallable, this preserves the full exception object. This is useful when callers need to match on exception types, but requires that serializers are configured for the exception types used when communicating with remote actors.

    This is the Java-friendly equivalent of #fromTryKeepException.

    Since

    2.0.0

  14. def fromTry[T](status: Try[T]): StatusReply[T]

    Scala API: Turn a scala.util.Try into a status reply.

    Scala API: Turn a scala.util.Try into a status reply.

    Transforms exceptions into status reply errors containing just the exception message string. This makes it safe for use with remote actors since Pekko includes built-in serializers for text-based error messages, unlike arbitrary exception types.

    See #fromTryKeepException for passing the exception along as is.

    Since

    2.0.0

  15. def fromTryKeepException[T](status: Try[T]): StatusReply[T]

    Scala API: Turn a scala.util.Try into a status reply, keeping the original exception.

    Scala API: Turn a scala.util.Try into a status reply, keeping the original exception.

    Unlike #fromTry, this preserves the full exception object. This is useful when callers need to match on exception types, but requires that serializers are configured for the exception types used when communicating with remote actors.

    Prefer #fromTry (string-based errors) 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.

    Also note that Pekko does not contain pre-built serializers for arbitrary exceptions.

    Since

    2.0.0

  16. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @IntrinsicCandidate() @native()
  17. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @IntrinsicCandidate() @native()
  18. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  19. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  20. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @IntrinsicCandidate() @native()
  21. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @IntrinsicCandidate() @native()
  22. def success[T](value: T): StatusReply[T]

    Java API: Create a successful reply containing value

  23. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  24. def toString(): String
    Definition Classes
    AnyRef → Any
  25. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  26. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()
  27. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  28. 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) => ...

  29. 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) => ...

Deprecated Value Members

  1. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.Throwable]) @Deprecated
    Deprecated

    (Since version 9)

Inherited from AnyRef

Inherited from Any

Ungrouped