|
|
Scala 2.3.3
|
object
Actor
extends java.lang.Object
with scala.ScalaObject
Actor object provides functions for the definition of
actors, as well as all actor operations, such as
receive, react, reply,
etc.| Class Summary | |
private
|
class
RecursiveProxyHandler
|
| Trait Summary | |
abstract
|
trait
Body
[a]
|
| Constructor Summary | |
def
this
|
|
| Val Summary | |
val
tl
: java.lang.ThreadLocal
|
|
| Def Summary | |
def
?
: scala.Any
|
|
def
actor
(body: => scala.Unit)
: scala.actors.Actor
|
|
def
eventloop
(f: scala.PartialFunction[scala.Any, scala.Unit])
: scala.Nothing
|
|
def
exit
(reason: java.lang.String)
: scala.Nothing
Terminates execution of
For each linked actor
For each linked actor |
|
def
link
(body: => scala.Unit)
: scala.actors.Actor
Links self to actor defined by body.
|
|
def
link
(to: scala.actors.Actor)
: scala.actors.Actor
Links self to actor to.
|
|
def
loop
(body: => scala.Unit)
: scala.Unit
Causes self to repeatedly execute
body.
|
|
implicit
|
def
mkBody
[a]
(body: => a)
: java.lang.Object with Actor.this.Body[a]
|
def
react
(f: scala.PartialFunction[scala.Any, scala.Unit])
: scala.Nothing
receive for event-based reactors.
Actions in f have to contain the rest of the
computation of self, as this method will never
return.
|
|
def
reactWithin
(msec: scala.Long)(f: scala.PartialFunction[scala.Any, scala.Unit])
: scala.Nothing
receiveWithin for event-based reactors.
Actions in f have to contain the rest of the
computation of self, as this method will never
return.
|
|
def
receive
[a]
(f: scala.PartialFunction[scala.Any, a])
: a
Receives a message from the mailbox of self. Blocks if no message matching any of the
cases of f can be received.
|
|
def
receiveWithin
[R]
(msec: scala.Long)(f: scala.PartialFunction[scala.Any, R])
: R
Receives a message from the mailbox of self. Blocks at most msec
milliseconds if no message matching any of the cases of
f can be received. If no message could be
received the TIMEOUT action is executed if
specified.
|
|
def
reply
: scala.Unit
Send () to the actor waiting in a call to
!?.
|
|
def
reply
(msg: scala.Any)
: scala.Unit
Send msg to the actor waiting in a call to
!?.
|
|
def
self
: scala.actors.Actor
Returns the currently executing actor. Should be used instead of this in all blocks of code executed by
actors.
|
|
def
sender
: scala.actors.Actor
Returns the actor which sent the last received message. |
|
def
seq
[a, b]
(first: => a, next: => b)
: scala.Nothing
Causes self to execute first
followed by next.
|
|
def
unlink
(from: scala.actors.Actor)
: scala.Unit
Unlinks self from actor from.
|
|
| Trait Detail |
abstract
trait
Body
[a]
extends java.lang.Object
with scala.ScalaObject
| Def Summary | |
abstract
|
def
andThen
[b]
(other: => b)
: scala.Nothing
|
| Def Detail |
| Constructor Detail |
| Val Detail |
| Def Detail |
def
?
: scala.Any
def
actor
(body: => scala.Unit): scala.actors.Actor
def
eventloop
(f: scala.PartialFunction[scala.Any, scala.Unit]): scala.Nothing
def
exit
(reason: java.lang.String): scala.Nothing
Terminates execution of self with the following
effect on linked actors:
For each linked actor a with
trapExit set to true, send message
Exit(self, reason) to a.
For each linked actor a with
trapExit set to false (default),
call a.exit(reason) if
!reason.equals("normal").
def
link
(body: => scala.Unit): scala.actors.Actor
self to actor defined by body.body - ...
def
link
(to: scala.actors.Actor): scala.actors.Actor
self to actor to.to - ...
def
loop
(body: => scala.Unit): scala.Unit
self to repeatedly execute
body.body - ...
implicit
def
mkBody
[a](body: => a): java.lang.Object with Actor.this.Body[a]
def
react
(f: scala.PartialFunction[scala.Any, scala.Unit]): scala.Nothing
receive for event-based reactors.
Actions in f have to contain the rest of the
computation of self, as this method will never
return.f - ...
def
reactWithin
(msec: scala.Long)(f: scala.PartialFunction[scala.Any, scala.Unit]): scala.Nothing
receiveWithin for event-based reactors.
Actions in f have to contain the rest of the
computation of self, as this method will never
return.msec - ...
f - ...
def
receive
[a](f: scala.PartialFunction[scala.Any, a]): a
self. Blocks if no message matching any of the
cases of f can be received.f - ...
def
receiveWithin
[R](msec: scala.Long)(f: scala.PartialFunction[scala.Any, R]): R
self. Blocks at most msec
milliseconds if no message matching any of the cases of
f can be received. If no message could be
received the TIMEOUT action is executed if
specified.msec - ...
f - ...
def
reply
: scala.Unit
() to the actor waiting in a call to
!?.
def
reply
(msg: scala.Any): scala.Unit
msg to the actor waiting in a call to
!?.
def
self
: scala.actors.Actor
this in all blocks of code executed by
actors.
def
sender
: scala.actors.Actor
def
seq
[a, b](first: => a, next: => b): scala.Nothing
self to execute first
followed by next.first - ...
next - ...
def
unlink
(from: scala.actors.Actor): scala.Unit
self from actor from.from - ...