Base type for custom exceptions raised within an actor
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.
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.
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"))
the left type of the Either
the right type of the Either
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.
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(_))
the type of the Try
Exception raised when an unhandled message is received by a CommonActor
Convenience methods and implicit wrappers for working with akka.actor.Actor classes