in scala.actors
trait Actor

abstract trait Actor
extends java.lang.Object
with scala.actors.OutputChannel[scala.Any]
with scala.ScalaObject

This class provides (together with Channel) an implementation of event-based actors.

The main ideas of our approach are explained in the papers
Event-Based Programming without Inversion of Control, Philipp Haller and Martin Odersky, Proc. JMLC 2006

Actors that Unify Threads and Events, Philipp Haller and Martin Odersky, LAMP-REPORT-2007-001, EPFL

Version:
0.9.4
Author:
Philipp Haller
Direct Known Subclasses:
ActorProxy

Val Summary
val waitingForNone : (scala.Any) => scala.Boolean

Var Summary
var continuation : scala.PartialFunction[scala.Any, scala.Unit]

var exitReason : java.lang.Object

var exiting : scala.Boolean

var isDetached : scala.Boolean

var isSuspended : scala.Boolean

var isWaiting : scala.Boolean

var kill : () => scala.Unit

var links : scala.List[scala.actors.Actor]

var shouldExit : scala.Boolean

var timeoutPending : scala.Boolean

var trapExit : scala.Boolean

var waitingFor : (scala.Any) => scala.Boolean

Def Summary
def ! (msg: scala.Any) : scala.Unit
Sends msg to this actor (asynchronous).
def !! (msg: scala.Any) : scala.actors.Future[scala.Any]
Sends msg to this actor and immediately returns a future representing the reply value.
def !! [a] (msg: scala.Any, f: scala.PartialFunction[scala.Any, a]) : scala.actors.Future[a]
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 !? (msec: scala.Long, msg: scala.Any) : scala.Option[scala.Any]
Sends msg to this actor and awaits reply (synchronous) within msec milliseconds. When the timeout occurs, None is returned. Otherwise, returns Some(value) where value is the reply value.
def !? (msg: scala.Any) : scala.Any
Sends msg to this actor and awaits reply (synchronous).
def ? : scala.Any
Receives the next message from this actor's mailbox.
abstract def act : scala.Unit
The behavior of an actor is specified by implementing this abstract method. Note that the preferred way to create actors is through the actor method defined in object Actor.
def exit : scala.Nothing
Terminates with exit reason 'normal.
def exit (reason: java.lang.Object) : 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 != 'normal.


def exit (from: scala.actors.Actor, reason: java.lang.Object) : scala.Unit

def exitLinked : scala.Unit

def exitLinked (reason: java.lang.Object) : scala.Unit

def forward (msg: scala.Any) : scala.Unit
Forwards msg to this actor (asynchronous).
def freshReply : scala.actors.Channel[scala.Any]

def getReplyChannel : scala.actors.Channel[scala.Any]

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 linkTo (to: scala.actors.Actor) : scala.Unit

def react (f: scala.PartialFunction[scala.Any, scala.Unit]) : scala.Nothing

def reactWithin (msec: scala.Long)(f: scala.PartialFunction[scala.Any, scala.Unit]) : scala.Nothing

def receive [R] (f: scala.PartialFunction[scala.Any, R]) : R

def receiveWithin [R] (msec: scala.Long)(f: scala.PartialFunction[scala.Any, R]) : R

def reply (msg: scala.Any) : scala.Unit
Replies with msg to the sender waiting in a synchronous send.
def resumeActor : scala.Unit

def scheduleActor (f: scala.PartialFunction[scala.Any, scala.Unit], msg: scala.Any) : scala.Unit

def sender : scala.actors.Actor

def session : scala.actors.Channel[scala.Any]

def start : scala.Unit
Starts this actor.
def suspendActor : scala.Unit

def suspendActorFor (msec: scala.Long) : scala.Unit

def tick : scala.Unit

def unlink (from: scala.actors.Actor) : scala.Unit
Unlinks self from actor from.
def unlinkFrom (from: scala.actors.Actor) : scala.Unit

Def inherited from scala.actors.OutputChannel[scala.Any]
! , forward
Val Detail
val waitingForNone : (scala.Any) => scala.Boolean

Var Detail
var continuation : scala.PartialFunction[scala.Any, scala.Unit]

var exitReason : java.lang.Object

var exiting : scala.Boolean

var isDetached : scala.Boolean

var isSuspended : scala.Boolean

var isWaiting : scala.Boolean

var kill : () => scala.Unit

var links : scala.List[scala.actors.Actor]

var shouldExit : scala.Boolean

var timeoutPending : scala.Boolean

var trapExit : scala.Boolean

var waitingFor : (scala.Any) => scala.Boolean

Def Detail
def ! (msg: scala.Any): scala.Unit
Sends msg to this actor (asynchronous).

def !! (msg: scala.Any): scala.actors.Future[scala.Any]
Sends msg to this actor and immediately returns a future representing the reply value.

def !! [a](msg: scala.Any, f: scala.PartialFunction[scala.Any, a]): scala.actors.Future[a]
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 !? (msec: scala.Long, msg: scala.Any): scala.Option[scala.Any]
Sends msg to this actor and awaits reply (synchronous) within msec milliseconds. When the timeout occurs, None is returned. Otherwise, returns Some(value) where value is the reply value.

def !? (msg: scala.Any): scala.Any
Sends msg to this actor and awaits reply (synchronous).

def ? : scala.Any
Receives the next message from this actor's mailbox.

abstract def act : scala.Unit
The behavior of an actor is specified by implementing this abstract method. Note that the preferred way to create actors is through the actor method defined in object Actor.

def exit : scala.Nothing
Terminates with exit reason 'normal.

def exit (reason: java.lang.Object): 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 != 'normal.


def exit (from: scala.actors.Actor, reason: java.lang.Object): scala.Unit

def exitLinked : scala.Unit

def exitLinked (reason: java.lang.Object): scala.Unit

def forward (msg: scala.Any): scala.Unit
Forwards msg to this actor (asynchronous).

def freshReply : scala.actors.Channel[scala.Any]

def getReplyChannel : scala.actors.Channel[scala.Any]

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.
Parameters:
to - ...
Returns:
...

def linkTo (to: scala.actors.Actor): scala.Unit

def react (f: scala.PartialFunction[scala.Any, scala.Unit]): scala.Nothing

def reactWithin (msec: scala.Long)(f: scala.PartialFunction[scala.Any, scala.Unit]): scala.Nothing

def receive [R](f: scala.PartialFunction[scala.Any, R]): R

def receiveWithin [R](msec: scala.Long)(f: scala.PartialFunction[scala.Any, R]): R

def reply (msg: scala.Any): scala.Unit
Replies with msg to the sender waiting in a synchronous send.

def resumeActor : scala.Unit

def scheduleActor (f: scala.PartialFunction[scala.Any, scala.Unit], msg: scala.Any): scala.Unit

def sender : scala.actors.Actor

def session : scala.actors.Channel[scala.Any]

def start : scala.Unit
Starts this actor.

def suspendActor : scala.Unit

def suspendActorFor (msec: scala.Long): scala.Unit

def tick : scala.Unit

def unlink (from: scala.actors.Actor): scala.Unit
Unlinks self from actor from.

def unlinkFrom (from: scala.actors.Actor): scala.Unit