Scala Library
|
|
scala/actors/InputChannel.scala
]
trait
InputChannel[+Msg]
extends
AnyRefInputChannel
trait provides a common interface
for all channels from which values can be received.Method Summary | |
abstract def
|
?
: Msg
Receives the next message from this
Channel . |
abstract def
|
react
(f : PartialFunction[Msg, Unit]) : Nothing
Receives a message from this
InputChannel . |
abstract def
|
reactWithin
(msec : Long)(f : PartialFunction[Any, Unit]) : Nothing
Receives a message from this
InputChannel within
a certain time span. |
abstract def
|
receive
[R](f : PartialFunction[Msg, R]) : R
Receives a message from this
InputChannel . |
abstract def
|
receiveWithin
[R](msec : Long)(f : PartialFunction[Any, R]) : R
Receives a message from this
InputChannel 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 |
Method Details |
abstract
def
receive[R](f : PartialFunction[Msg, R]) : R
InputChannel
.f -
a partial function with message patterns and actionsabstract
def
receiveWithin[R](msec : Long)(f : PartialFunction[Any, R]) : R
InputChannel
within
a certain time span.msec -
the time span before timeoutf -
a partial function with message patterns and actionsabstract
def
react(f : PartialFunction[Msg, Unit]) : Nothing
InputChannel
.
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 actionsabstract
def
reactWithin(msec : Long)(f : PartialFunction[Any, Unit]) : Nothing
InputChannel
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 actionsabstract
def
? : Msg
Channel
.
Scala Library
|
|