akka.actor
Class ActorCell

java.lang.Object
  extended by akka.actor.ActorCell
All Implemented Interfaces:
AbstractActorContext, ActorContext, ActorRefFactory, Cell, Children, DeathWatch, Dispatch, FaultHandling, ReceiveTimeout, UntypedActorContext
Direct Known Subclasses:
RoutedActorCell

public class ActorCell
extends java.lang.Object
implements UntypedActorContext, AbstractActorContext, Cell, ReceiveTimeout, Children, Dispatch, DeathWatch, FaultHandling

Everything in here is completely Akka PRIVATE. You will not find any supported APIs in this place. This is not the API you were looking for! (waves hand)


Constructor Summary
ActorCell(ActorSystemImpl system, InternalActorRef self, Props props, MessageDispatcher dispatcher, InternalActorRef parent)
           
 
Method Summary
 Actor actor()
           
 void autoReceiveMessage(Envelope msg)
           
 void become(scala.PartialFunction<java.lang.Object,scala.runtime.BoxedUnit> behavior, boolean discardOld)
          Changes the Actor's behavior to become the new 'Receive' (PartialFunction[Any, Unit]) handler.
 void become(Procedure<java.lang.Object> behavior)
          Changes the Actor's behavior to become the new 'Procedure' handler.
 void become(Procedure<java.lang.Object> behavior, boolean discardOld)
          Changes the Actor's behavior to become the new 'Procedure' handler.
protected  java.lang.Class<?> clazz(java.lang.Object o)
           
protected  void clearActorCellFields(ActorCell cell)
           
protected  void clearActorFields(Actor actorInstance, boolean recreate)
           
static java.lang.ThreadLocal<scala.collection.immutable.List<ActorContext>> contextStack()
           
protected  void create(scala.Option<ActorInitializationException> failure)
           
 Envelope currentMessage()
           
static int DefaultState()
           
 MessageDispatcher dispatcher()
          Returns the dispatcher (MessageDispatcher) that is used for this Actor.
static scala.collection.immutable.Set<ActorRef> emptyActorRefSet()
           
static scala.collection.immutable.List<scala.PartialFunction<java.lang.Object,scala.runtime.BoxedUnit>> emptyBehaviorStack()
           
static Cancellable emptyCancellable()
           
protected  InternalActorRef guardian()
          Father of all children created by this interface.
protected  void handleSupervise(ActorRef child, boolean async)
           
 void invoke(Envelope messageHandle)
           
 boolean isLocal()
          Returns true if the actor is local, i.e.
protected  InternalActorRef lookupRoot()
          INTERNAL API
protected  Actor newActor()
           
static int newUid()
           
 InternalActorRef parent()
          Returns the supervising parent ActorRef.
 Props props()
          Retrieve the Props which were used to create this actor.
 ActorRefProvider provider()
          INTERNAL API
protected  void publish(Logging.LogEvent e)
           
 void receiveMessage(java.lang.Object msg)
           
 InternalActorRef self()
          The &ldquo;self&rdquo; reference which this Cell is attached to.
 ActorRef sender()
          Returns the sender 'ActorRef' of the current message.
protected  void setActorFields(Actor actorInstance, ActorContext context, ActorRef self)
           
static scala.Tuple2<java.lang.String,java.lang.Object> splitNameAndUid(java.lang.String name)
           
protected  void stash(SystemMessage msg)
           
static int SuspendedState()
           
static int SuspendedWaitForChildrenState()
           
 ActorSystemImpl system()
          The system that the actor belongs to.
 ActorSystemImpl systemImpl()
          INTERNAL API
 void systemInvoke(SystemMessage message)
           
static Props terminatedProps()
           
protected  int uid()
           
 void unbecome()
          Reverts the Actor behavior to the previous one on the behavior stack.
static int undefinedUid()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface akka.actor.UntypedActorContext
getChild, getChildren
 
Methods inherited from interface akka.actor.AbstractActorContext
getChild, getChildren
 
Methods inherited from interface akka.actor.ActorContext
become, child, children, receiveTimeout, setReceiveTimeout, unwatch, watch, writeObject
 
Methods inherited from interface akka.actor.ActorRefFactory
actorFor, actorFor, actorFor, actorFor, actorOf, actorOf, actorSelection, actorSelection, stop
 
Methods inherited from interface akka.actor.Cell
childrenRefs, getChildByName, getSingleChild, hasMessages, isTerminated, numberOfMessages, restart, resume, sendMessage, sendMessage, sendSystemMessage, start, stop, suspend
 
Methods inherited from interface akka.actor.dungeon.ReceiveTimeout
cancelReceiveTimeout, checkReceiveTimeout, receiveTimeout, receiveTimeoutData, setReceiveTimeout
 
Methods inherited from interface akka.actor.dungeon.Children
_childrenRefsDoNotCallMeDirectly, _nextNameDoNotCallMeDirectly, actorOf, actorOf, attachChild, attachChild, checkName, child, children, childrenRefs, getAllChildStats, getChild, getChildByName, getChildByRef, getChildren, getSingleChild, initChild, isNormal, isTerminating, makeChild, randomName, removeChildAndGetStateChange, reserveChild, resumeChildren, setChildrenTerminationReason, setTerminated, stop, suspendChildren, swapChildrenRefs, unreserveChild, waitingForChildrenOrNull
 
Methods inherited from interface akka.actor.dungeon.Dispatch
_mailboxDoNotCallMeDirectly, handleException, hasMessages, init, isTerminated, mailbox, numberOfMessages, restart, resume, sendMessage, sendSystemMessage, start, stop, suspend, swapMailbox
 
Methods inherited from interface akka.actor.dungeon.DeathWatch
addressTerminated, addWatcher, maintainAddressTerminatedSubscription, receivedTerminated, removeFromSet, remWatcher, subscribeAddressTerminated, tellWatchersWeDied, terminatedQueued, terminatedQueuedFor, unsubscribeAddressTerminated, unwatch, unwatchWatchedActors, watch, watchedActorTerminated, watchedBy, watching, watchingContains
 
Methods inherited from interface akka.actor.dungeon.FaultHandling
_failed, clearFailed, faultCreate, faultRecreate, faultResume, faultSuspend, finishCreate, finishRecreate, finishTerminate, handleChildTerminated, handleFailure, handleInvokeFailure, handleNonFatalOrInterruptedException, isFailed, perpetrator, resumeNonRecursive, setFailed, suspendNonRecursive, terminate
 

Constructor Detail

ActorCell

public ActorCell(ActorSystemImpl system,
                 InternalActorRef self,
                 Props props,
                 MessageDispatcher dispatcher,
                 InternalActorRef parent)
Method Detail

contextStack

public static java.lang.ThreadLocal<scala.collection.immutable.List<ActorContext>> contextStack()

emptyCancellable

public static final Cancellable emptyCancellable()

emptyBehaviorStack

public static final scala.collection.immutable.List<scala.PartialFunction<java.lang.Object,scala.runtime.BoxedUnit>> emptyBehaviorStack()

emptyActorRefSet

public static final scala.collection.immutable.Set<ActorRef> emptyActorRefSet()

terminatedProps

public static final Props terminatedProps()

undefinedUid

public static final int undefinedUid()

newUid

public static final int newUid()

splitNameAndUid

public static final scala.Tuple2<java.lang.String,java.lang.Object> splitNameAndUid(java.lang.String name)

DefaultState

public static final int DefaultState()

SuspendedState

public static final int SuspendedState()

SuspendedWaitForChildrenState

public static final int SuspendedWaitForChildrenState()

system

public ActorSystemImpl system()
Description copied from interface: ActorContext
The system that the actor belongs to. Importing this member will place an implicit ActorSystem in scope.

Specified by:
system in interface ActorContext
Specified by:
system in interface Cell
Returns:
(undocumented)

self

public InternalActorRef self()
Description copied from interface: Cell
The &ldquo;self&rdquo; reference which this Cell is attached to.

Specified by:
self in interface ActorContext
Specified by:
self in interface Cell
Returns:
(undocumented)

props

public final Props props()
Description copied from interface: ActorContext
Retrieve the Props which were used to create this actor.

Specified by:
props in interface ActorContext
Specified by:
props in interface Cell
Returns:
(undocumented)

dispatcher

public MessageDispatcher dispatcher()
Description copied from interface: ActorContext
Returns the dispatcher (MessageDispatcher) that is used for this Actor. Importing this member will place an implicit ExecutionContext in scope.

Specified by:
dispatcher in interface ActorContext
Specified by:
dispatcher in interface ActorRefFactory
Returns:
(undocumented)

parent

public InternalActorRef parent()
Description copied from interface: ActorContext
Returns the supervising parent ActorRef.

Specified by:
parent in interface ActorContext
Specified by:
parent in interface Cell
Returns:
(undocumented)

isLocal

public final boolean isLocal()
Description copied from interface: Cell
Returns true if the actor is local, i.e. if it is actually scheduled on a Thread in the current JVM when run.

Specified by:
isLocal in interface Cell
Returns:
(undocumented)

systemImpl

public final ActorSystemImpl systemImpl()
Description copied from interface: ActorRefFactory
INTERNAL API

Specified by:
systemImpl in interface ActorRefFactory
Specified by:
systemImpl in interface Cell
Returns:
(undocumented)

guardian

protected final InternalActorRef guardian()
Description copied from interface: ActorRefFactory
Father of all children created by this interface.

INTERNAL API

Specified by:
guardian in interface ActorRefFactory
Returns:
(undocumented)

lookupRoot

protected final InternalActorRef lookupRoot()
Description copied from interface: ActorRefFactory
INTERNAL API

Specified by:
lookupRoot in interface ActorRefFactory
Returns:
(undocumented)

provider

public final ActorRefProvider provider()
Description copied from interface: ActorRefFactory
INTERNAL API

Specified by:
provider in interface ActorRefFactory
Returns:
(undocumented)

uid

protected int uid()

actor

public Actor actor()

currentMessage

public Envelope currentMessage()

stash

protected void stash(SystemMessage msg)

systemInvoke

public final void systemInvoke(SystemMessage message)

invoke

public final void invoke(Envelope messageHandle)

autoReceiveMessage

public void autoReceiveMessage(Envelope msg)

receiveMessage

public final void receiveMessage(java.lang.Object msg)

sender

public final ActorRef sender()
Description copied from interface: ActorContext
Returns the sender 'ActorRef' of the current message.

Specified by:
sender in interface ActorContext
Returns:
(undocumented)

become

public void become(scala.PartialFunction<java.lang.Object,scala.runtime.BoxedUnit> behavior,
                   boolean discardOld)
Description copied from interface: ActorContext
Changes the Actor's behavior to become the new 'Receive' (PartialFunction[Any, Unit]) handler. This method acts upon the behavior stack as follows:

- if discardOld = true it will replace the top element (i.e. the current behavior) - if discardOld = false it will keep the current behavior and push the given one atop

The default of replacing the current behavior on the stack has been chosen to avoid memory leaks in case client code is written without consulting this documentation first (i.e. always pushing new behaviors and never issuing an unbecome())

Specified by:
become in interface ActorContext
Parameters:
behavior - (undocumented)
discardOld - (undocumented)

become

public void become(Procedure<java.lang.Object> behavior)
Description copied from interface: UntypedActorContext
Changes the Actor's behavior to become the new 'Procedure' handler. Replaces the current behavior on the top of the behavior stack.

Specified by:
become in interface UntypedActorContext
Parameters:
behavior - (undocumented)

become

public void become(Procedure<java.lang.Object> behavior,
                   boolean discardOld)
Description copied from interface: UntypedActorContext
Changes the Actor's behavior to become the new 'Procedure' handler. This method acts upon the behavior stack as follows:

- if discardOld = true it will replace the top element (i.e. the current behavior) - if discardOld = false it will keep the current behavior and push the given one atop

The default of replacing the current behavior on the stack has been chosen to avoid memory leaks in case client code is written without consulting this documentation first (i.e. always pushing new behaviors and never issuing an unbecome())

Specified by:
become in interface UntypedActorContext
Parameters:
behavior - (undocumented)
discardOld - (undocumented)

unbecome

public void unbecome()
Description copied from interface: ActorContext
Reverts the Actor behavior to the previous one on the behavior stack.

Specified by:
unbecome in interface ActorContext

newActor

protected Actor newActor()

create

protected void create(scala.Option<ActorInitializationException> failure)

handleSupervise

protected void handleSupervise(ActorRef child,
                               boolean async)

clearActorCellFields

protected final void clearActorCellFields(ActorCell cell)

clearActorFields

protected final void clearActorFields(Actor actorInstance,
                                      boolean recreate)

setActorFields

protected final void setActorFields(Actor actorInstance,
                                    ActorContext context,
                                    ActorRef self)

publish

protected final void publish(Logging.LogEvent e)

clazz

protected final java.lang.Class<?> clazz(java.lang.Object o)