public class RepointableActorRef extends ActorRefWithCell implements RepointableRef
Constructor and Description |
---|
RepointableActorRef(ActorSystemImpl system,
Props props,
MessageDispatcher dispatcher,
MailboxType mailboxType,
InternalActorRef supervisor,
ActorPath path) |
Modifier and Type | Method and Description |
---|---|
scala.collection.immutable.Iterable<ActorRef> |
children() |
MessageDispatcher |
dispatcher() |
InternalActorRef |
getChild(scala.collection.Iterator<java.lang.String> name)
Obtain ActorRef by possibly traversing the actor tree or looking it up at
some provider-specific location.
|
InternalActorRef |
getParent()
Obtain parent of this ref; used by getChild for ".." paths.
|
InternalActorRef |
getSingleChild(java.lang.String name)
Method for looking up a single child beneath this actor.
|
RepointableActorRef |
initialize(boolean async)
Initialize: make a dummy cell which holds just a mailbox, then tell our
supervisor that we exist so that he can create the real Cell in
handleSupervise().
|
boolean |
isLocal()
Scope: if this ref points to an actor which resides within the same JVM,
i.e.
|
boolean |
isStarted() |
boolean |
isTerminated()
Deprecated.
Use context.watch(actor) and receive Terminated(actor). Since 2.2.
|
Cell |
lookup() |
MailboxType |
mailboxType() |
Cell |
newCell(UnstartedCell old)
This is called by activate() to obtain the cell which is to replace the
unstarted cell.
|
ActorPath |
path()
Returns the path for this actor (from this actor up to the root actor).
|
RepointableActorRef |
point(boolean catchFailures)
This method is supposed to be called by the supervisor in handleSupervise()
to replace the UnstartedCell with the real one.
|
Props |
props() |
ActorRefProvider |
provider()
Get a reference to the actor ref provider which created this ref.
|
void |
restart(java.lang.Throwable cause) |
void |
resume(java.lang.Throwable causedByFailure) |
void |
sendSystemMessage(SystemMessage message) |
void |
start() |
void |
stop() |
InternalActorRef |
supervisor() |
void |
suspend() |
Cell |
swapCell(Cell next) |
Cell |
swapLookup(Cell next) |
ActorSystemImpl |
system() |
Cell |
underlying() |
protected java.lang.Object |
writeReplace() |
public RepointableActorRef(ActorSystemImpl system, Props props, MessageDispatcher dispatcher, MailboxType mailboxType, InternalActorRef supervisor, ActorPath path)
public ActorSystemImpl system()
public Props props()
public MessageDispatcher dispatcher()
public MailboxType mailboxType()
public InternalActorRef supervisor()
public ActorPath path()
ActorRef
public Cell underlying()
underlying
in class ActorRefWithCell
public Cell lookup()
public RepointableActorRef initialize(boolean async)
Call twice on your own peril!
This is protected so that others can have different initialization.
async
- (undocumented)public RepointableActorRef point(boolean catchFailures)
underlying
field, though it is safe to send messages
at any time.catchFailures
- (undocumented)public Cell newCell(UnstartedCell old)
old
- (undocumented)public void start()
start
in class InternalActorRef
public void suspend()
suspend
in class InternalActorRef
public void resume(java.lang.Throwable causedByFailure)
resume
in class InternalActorRef
public void stop()
stop
in class InternalActorRef
public void restart(java.lang.Throwable cause)
restart
in class InternalActorRef
public boolean isStarted()
isStarted
in interface RepointableRef
public boolean isTerminated()
InternalActorRef
isTerminated
in class InternalActorRef
public ActorRefProvider provider()
InternalActorRef
provider
in class InternalActorRef
public boolean isLocal()
InternalActorRef
isLocal
in interface ActorRefScope
isLocal
in class InternalActorRef
public InternalActorRef getParent()
InternalActorRef
getParent
in class InternalActorRef
public InternalActorRef getChild(scala.collection.Iterator<java.lang.String> name)
InternalActorRef
getChild
in class InternalActorRef
name
- (undocumented)public InternalActorRef getSingleChild(java.lang.String name)
getSingleChild
in class ActorRefWithCell
name
- (undocumented)public scala.collection.immutable.Iterable<ActorRef> children()
children
in class ActorRefWithCell
public void sendSystemMessage(SystemMessage message)
sendSystemMessage
in class InternalActorRef
protected java.lang.Object writeReplace() throws java.io.ObjectStreamException
java.io.ObjectStreamException