com.paypal.cascade.akka

actor

package actor

Convenience methods and implicit wrappers for working with akka.actor.Actor classes

Linear Supertypes
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. actor
  2. AnyRef
  3. Any
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Type Members

  1. abstract class ActorException extends Exception

    Base type for custom exceptions raised within an actor

  2. class ActorSystemWrapper extends AnyRef

    Provides the root actor which supervises other actors and handles spray http requests.

    Provides the root actor which supervises other actors and handles spray http requests. Use this wrapper as input anywhere you need access to an ActorSystem, ActorRefFactory, or ExecutionContext. Since an app generally has one ActorSystem, treat this wrapper like a singleton - create it on app startup and pass it to everywhere you need it.

  3. trait CommonActor extends Actor with ActorLogging

    CommonActor is intended for top-level actors that have robust error-handling, and that are responsible for receiving exceptions from other actors.

    CommonActor is intended for top-level actors that have robust error-handling, and that are responsible for receiving exceptions from other actors. Generally, there should only be one actor (or a small pool of actors) extending this trait directly.

  4. implicit class EitherOrFailure[E, A] extends AnyRef

    Implicit wrapper for Either objects, right-biased, with methods that interoperate with actors.

    Implicit wrapper for Either objects, right-biased, with methods that interoperate with actors.

    // given some ActorRef `actor` and a custom exception type `case class CustomException(e: Exception)`
    actor ! Right("hello").orFailureWith(new Exception("fail"))  // sends "hello"
    actor ! Left("no").orFailureWith(new Exception("fail"))      // sends Status.Failure(Exception("fail"))
    actor ! Left("no").orFailureWith(CustomException(_))         // sends Status.Failure(Exception("no"))
    E

    the left type of the Either

    A

    the right type of the Either

  5. trait ServiceActor extends CommonActor

    ServiceActor returns an error response for unhandled messages and escalates the error to the supervisor by throwing an exception.

    ServiceActor returns an error response for unhandled messages and escalates the error to the supervisor by throwing an exception. For most child actors, this trait should be preferred.

  6. implicit class TryOrFailure[A >: Any] extends AnyRef

    Implicit wrapper for Try objects, with methods that interoperate with Actors

    Implicit wrapper for Try objects, with methods that interoperate with Actors

    // given some ActorRef `actor`
    val t = Try { ... }
    actor ! t.orFailure
    // given some ActorRef `actor`
    val t = Try { ... }
    actor ! t.orFailureWith(new Exception("it died!"))
    // given some ActorRef `actor` and a custom exception type `case class CustomException(e: Exception)`
    val t = Try { ... }
    actor ! t.orFailureWith(CustomException(_))

    See https://issues.scala-lang.org/browse/SI-8806 for the rationale behind A >: Any.

    A

    the type of the Try

  7. class UnhandledMessageException extends ActorException

    Exception raised when an unhandled message is received by a CommonActor

Inherited from AnyRef

Inherited from Any

Ungrouped