|
|
Scala 2.4.0-final
|
class
Channel
[Msg]
extends java.lang.Object
with scala.actors.InputChannel[Msg]
with scala.actors.OutputChannel[Msg]
with scala.ScalaObject
Channel may receive from it.| Constructor Summary | |
def
this
|
|
def
this
(recv: scala.actors.Actor)
|
|
| Var Summary | |
var
receiver
: scala.actors.Actor
|
|
| Def Summary | |
def
!
(msg: Msg)
: scala.Unit
Sends a message to this Channel.
|
|
def
!?
(msec: scala.Long, msg: Msg)
: scala.Option[scala.Any]
Sends a message to this Channel and
awaits reply within a certain time span.
|
|
def
!?
(msg: Msg)
: scala.Any
Sends a message to this Channel and
awaits reply.
|
|
def
forward
(msg: Msg)
: scala.Unit
Forwards msg to this keeping the
last sender as sender instead of self.
|
|
def
react
(f: scala.PartialFunction[Msg, scala.Unit])
: scala.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: scala.Long)(f: scala.PartialFunction[scala.Any, scala.Unit])
: scala.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: scala.PartialFunction[Msg, R])
: R
Receives a message from this Channel.
|
|
def
receiveWithin
[R]
(msec: scala.Long)(f: scala.PartialFunction[scala.Any, R])
: R
Receives a message from this Channel within a certain
time span.
|
|
| Def inherited from scala.actors.InputChannel[Msg] | |
| react , reactWithin, receive, receiveWithin |
| Def inherited from scala.actors.OutputChannel[Msg] | |
| ! , forward |
| Constructor Detail |
| Var Detail |
| Def Detail |
def
!
(msg: Msg): scala.Unit
Channel.msg - the message to be sent
def
!?
(msec: scala.Long, msg: Msg): scala.Option[scala.Any]
Channel and
awaits reply within a certain time span.msec - the time span before timeout
msg - the message to be sent
None in case of timeout, otherwise Some(x) where x is the reply
Channel and
awaits reply.msg - the message to be sent
def
forward
(msg: Msg): scala.Unit
msg to this keeping the
last sender as sender instead of self.
def
react
(f: scala.PartialFunction[Msg, scala.Unit]): scala.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: scala.Long)(f: scala.PartialFunction[scala.Any, scala.Unit]): scala.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 timeout
f - a partial function with message patterns and actions
def
receive
[R](f: scala.PartialFunction[Msg, R]): R
Channel.f - a partial function with message patterns and actions
def
receiveWithin
[R](msec: scala.Long)(f: scala.PartialFunction[scala.Any, R]): R
Channel within a certain
time span.msec - the time span before timeout
f - a partial function with message patterns and actions