Packages

  • package root
    Definition Classes
    root
  • package org
    Definition Classes
    root
  • package querki
    Definition Classes
    org
  • package requester
    Definition Classes
    querki
  • trait RequesterImplicits extends AnyRef

    Implicit that hooks into *other* Actors, to provide the nice request() syntax to send messages to them.

    Implicit that hooks into *other* Actors, to provide the nice request() syntax to send messages to them. These implicits are available to any Actor that mixes in Requester, but RequesterImplicits should also be mixed into any other class that wants access to this capability. Those other classes must have access to a Requester -- usually, they should be functional classes owned *by* a Requester.

    This trait gives you the functions that you actually call directly -- request() and requestFor(). But those calls mostly create RequestM objects, and the actual work gets done by the associated Requester.

    Definition Classes
    requester
  • RequestableActorRef
  • RequestableActorSelection

implicit class RequestableActorRef extends AnyRef

Hook to add the request() methods to a third-party Actor.

Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. RequestableActorRef
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new RequestableActorRef(target: ActorRef)

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. def ?(msg: Any): RequestM[Any]

    ask-style syntax for ordinary requests.

    ask-style syntax for ordinary requests.

    This *intentionally* conflicts with akka.pattern.ask, on the grounds that if you're in an askable situation, it is generally a bug to be using raw asks. So if you wind up with ambiguity, that's a warning sign.

    (I might be willing to break this out, to make it possible to work around it, but somebody's going to have to convince me it's a good idea to do so. If you really want to use ask, then spell it out explicitly.)

  5. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  6. def clone(): AnyRef
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @native() @throws( ... )
  7. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  8. def equals(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  9. def finalize(): Unit
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  10. final def getClass(): Class[_]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  11. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  12. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  13. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  14. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  15. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  16. def request(msg: Any, retries: Int = 0): RequestM[Any]

    The basic, simple version of request() -- sends a message, process the response.

    The basic, simple version of request() -- sends a message, process the response.

    You can think of request as a better-behaved version of ask. Where ask sends a message to the target actor, and gives you a Future that will execute when the response is received, request does the same thing but will process the resulting RequestM in the Actor's receive loop. While this doesn't save you from every possible problem, it makes it much easier to write clear and complex operations, involving coordinating several different Actors, without violating the central invariants of the Actor model.

    The current sender will be preserved and will be active during the processing of the results, so you can use it as normal.

    This version of the call does not impose any expectations on the results. You can use a destructuring case class in a for comprehension if you want just a single return type, or you can map the RequestM to a PartialFunction in order to handle several possible returns.

    msg

    The message to send to the target actor.

    retries

    The number of times to retry this request, if it times out.

  17. def requestFor[T](msg: Any, retriesInit: Int = 0)(implicit tag: ClassTag[T], enclosing: FullName, file: File, line: Line): RequestM[T]

    A more strongly-typed version of request().

    A more strongly-typed version of request().

    This works pretty much exactly like request, but expects that the response will be of type T. It will throw a ClassCastException if anything else is received. Otherwise, it is identical to request().

  18. final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
    AnyRef
  19. def toString(): String
    Definition Classes
    AnyRef → Any
  20. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  21. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  22. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @throws( ... )

Inherited from AnyRef

Inherited from Any

Ungrouped