scala.actors

trait Replyable

[source: scala/actors/Replyable.scala]

trait Replyable[-T, +R]
extends AnyRef
The Replyable trait defines result-bearing message send operations on replyable actors.
Author
Philipp Haller
Direct Known Subclasses:
AbstractActor

Method Summary
def !! [P](msg : T, f : PartialFunction[R, P]) : () => P
Sends msg to this actor and immediately returns a future representing the reply value. The reply is post-processed using the partial function f. This also allows to recover a more precise type for the reply value.
def !! (msg : T) : () => R
Sends msg to this actor and immediately returns a future representing the reply value.
abstract def !? (msec : Long, msg : T) : Option[R]
Sends msg to this Replyable and awaits reply (synchronous) within msec milliseconds.
abstract def !? (msg : T) : R
Sends msg to this Replyable and awaits reply (synchronous).
Methods inherited from AnyRef
getClass, hashCode, equals, clone, toString, notify, notifyAll, wait, wait, wait, finalize, ==, !=, eq, ne, synchronized
Methods inherited from Any
==, !=, isInstanceOf, asInstanceOf
Method Details
abstract def !?(msg : T) : R
Sends msg to this Replyable and awaits reply (synchronous).
Parameters
msg - the message to be sent
Returns
the reply

abstract def !?(msec : Long, msg : T) : Option[R]
Sends msg to this Replyable and awaits reply (synchronous) within msec milliseconds.
Parameters
msec - the time span before timeout
msg - the message to be sent
Returns
None in case of timeout, otherwise Some(x) where x is the reply

def !!(msg : T) : () => R
Sends msg to this actor and immediately returns a future representing the reply value.
Parameters
msg - the message to be sent
Returns
the future

def !![P](msg : T, f : PartialFunction[R, P]) : () => P
Sends msg to this actor and immediately returns a future representing the reply value. The reply is post-processed using the partial function f. This also allows to recover a more precise type for the reply value.
Parameters
msg - the message to be sent
f - the function to be applied to the response
Returns
the future