trait RequesterImplicits extends AnyRef
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.
- Alphabetic
- By Inheritance
- RequesterImplicits
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Type Members
-
implicit
class
RequestableActorRef extends AnyRef
Hook to add the request() methods to a third-party Actor.
-
implicit
class
RequestableActorSelection extends AnyRef
Similar to RequestableActorRef, but works with an ActorSelection.
Abstract Value Members
-
abstract
def
requester: Requester
The actual Requester that is going to send the requests and process the responses.
The actual Requester that is going to send the requests and process the responses. If you mix RequesterImplicits into a non-Requester, this must point to that Actor, which does all the real work. (If you are using this from within Requester, it's already set.)
Concrete Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
clone(): AnyRef
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @native() @throws( ... )
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
finalize(): Unit
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
implicit
def
loopback[T](f: Future[T])(implicit tag: ClassTag[T], enclosing: FullName, file: File, line: Line): RequestM[T]
Convert a Future into a Request.
Convert a Future into a Request.
This takes the specified Future, and runs it in the Requester's main loop, to make it properly safe. As usual, sender will be preserved.
This is implicit, so if you are in a context that already expects a Request (such as a for comprehension with a Request at the top), it will quietly turn the Future into a Request. If Request isn't already expected, though, you'll have to specify loopback explicitly.
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
implicit
def
request2Future[T](req: RequestM[T]): Future[T]
Convert a Request into a Future.
Convert a Request into a Future.
Sometimes, at the edges of the API, you need to think in terms of Futures. When this is necessary, this implicit will take your RequestM and turn it into a Future of the matching type.
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
toString(): String
- Definition Classes
- AnyRef → Any
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @throws( ... )