|
Scala Library Documentation
|
|
scala/actors/Channel.scala]
class
Channel[Msg]
extends InputChannel[Msg] with OutputChannel[Msg]Channel may receive from it.| Additional Constructor Summary | |
def
|
this (recv : Actor) : Channel[Msg] |
| Value Summary | |
var
|
receiver : Actor |
| Method Summary | |
def
|
!
(msg : Msg) : Unit
Sends a message to this
Channel. |
def
|
!?
(msec : Long, msg : Msg) : Option[Any]
Sends a message to this
Channel and
awaits reply within a certain time span. |
def
|
!?
(msg : Msg) : Any
Sends a message to this
Channel and
awaits reply. |
def
|
forward
(msg : Msg) : Unit
Forwards
msg to this keeping the
last sender as sender instead of self. |
def
|
react
(f : PartialFunction[Msg, Unit]) : Nothing
Receives a message from this
Channel.
This method never returns. Therefore, the rest of the computation has to be contained in the actions of the partial function. |
def
|
reactWithin
(msec : Long)(f : PartialFunction[Any, Unit]) : Nothing
Receives a message from this
Channel within a certain
time span.
This method never returns. Therefore, the rest of the computation has to be contained in the actions of the partial function. |
def
|
receive
[R](f : PartialFunction[Msg, R]) : R
Receives a message from this
Channel. |
def
|
receiveWithin
[R](msec : Long)(f : PartialFunction[Any, R]) : R
Receives a message from this
Channel within a certain
time span. |
| Methods inherited from AnyRef | |
| getClass, hashCode, equals, clone, toString, notify, notifyAll, wait, wait, wait, finalize, ==, !=, eq, ne, synchronized |
| Methods inherited from Any | |
| ==, !=, isInstanceOf, asInstanceOf |
| Additional Constructor Details |
| Value Details |
| Method Details |
Channel.msg - the message to be sentmsg to this keeping the
last sender as sender instead of self.
def
receive[R](f : PartialFunction[Msg, R]) : R
Channel.f - a partial function with message patterns and actions
def
receiveWithin[R](msec : Long)(f : PartialFunction[Any, R]) : R
Channel within a certain
time span.msec - the time span before timeoutf - a partial function with message patterns and actions
def
react(f : PartialFunction[Msg, Unit]) : Nothing
Channel.
This method never returns. Therefore, the rest of the computation has to be contained in the actions of the partial function.
f - a partial function with message patterns and actions
def
reactWithin(msec : Long)(f : PartialFunction[Any, Unit]) : Nothing
Channel within a certain
time span.
This method never returns. Therefore, the rest of the computation has to be contained in the actions of the partial function.
msec - the time span before timeoutf - a partial function with message patterns and actionsChannel and
awaits reply.msg - the message to be sentChannel and
awaits reply within a certain time span.msec - the time span before timeoutmsg - the message to be sentNone in case of timeout, otherwise Some(x) where x is the reply|
Scala Library Documentation
|
|