Package akka.actor
Interface ActorRefFactory
- 
- All Known Subinterfaces:
- AbstractActor.ActorContext,- ActorContext
 - All Known Implementing Classes:
- ActorSystem,- ExtendedActorSystem
 
 public interface ActorRefFactoryInterface implemented by ActorSystem and ActorContext, the only two places from which you can get fresh actors.Not for user extension 
- 
- 
Method SummaryAll Methods Instance Methods Abstract Methods Modifier and Type Method Description ActorRefactorOf(Props props)Create new actor as child of this context and give it an automatically generated name (currently similar to base64-encoded integer count, reversed and with “$” prepended, may change in the future).ActorRefactorOf(Props props, java.lang.String name)Create new actor as child of this context with the given name, which must not be null, empty or start with “$”.ActorSelectionactorSelection(ActorPath path)Construct anActorSelectionfrom the given path, which is parsed for wildcards (these are replaced by regular expressions internally).ActorSelectionactorSelection(java.lang.String path)Construct anActorSelectionfrom the given path, which is parsed for wildcards (these are replaced by regular expressions internally).scala.concurrent.ExecutionContextExecutordispatcher()Returns the default MessageDispatcher associated with this ActorRefFactoryakka.actor.InternalActorRefguardian()Parent of all children created by this interface.akka.actor.InternalActorReflookupRoot()INTERNAL APIActorRefProviderprovider()INTERNAL APIvoidstop(ActorRef actor)Stop the actor pointed to by the givenActorRef; this is an asynchronous operation, i.e.akka.actor.ActorSystemImplsystemImpl()INTERNAL API
 
- 
- 
- 
Method Detail- 
actorOfActorRef actorOf(Props props) Create new actor as child of this context and give it an automatically generated name (currently similar to base64-encoded integer count, reversed and with “$” prepended, may change in the future).See Propsfor details on how to obtain aPropsobject.- Throws:
- ConfigurationException- if deployment, dispatcher or mailbox configuration is wrong
- java.lang.UnsupportedOperationException- if invoked on an ActorSystem that uses a custom user guardian
 
 - 
actorOfActorRef actorOf(Props props, java.lang.String name) Create new actor as child of this context with the given name, which must not be null, empty or start with “$”. If the given name is already in use, anInvalidActorNameExceptionis thrown.See Propsfor details on how to obtain aPropsobject.- Throws:
- InvalidActorNameException- if the given name is invalid or already in use
- ConfigurationException- if deployment, dispatcher or mailbox configuration is wrong
- java.lang.UnsupportedOperationException- if invoked on an ActorSystem that uses a custom user guardian
 
 - 
actorSelectionActorSelection actorSelection(java.lang.String path) Construct anActorSelectionfrom the given path, which is parsed for wildcards (these are replaced by regular expressions internally). No attempt is made to verify the existence of any part of the supplied path, it is recommended to send a message and gather the replies in order to resolve the matching set of actors.
 - 
actorSelectionActorSelection actorSelection(ActorPath path) Construct anActorSelectionfrom the given path, which is parsed for wildcards (these are replaced by regular expressions internally). No attempt is made to verify the existence of any part of the supplied path, it is recommended to send a message and gather the replies in order to resolve the matching set of actors.
 - 
dispatcherscala.concurrent.ExecutionContextExecutor dispatcher() Returns the default MessageDispatcher associated with this ActorRefFactory
 - 
guardianakka.actor.InternalActorRef guardian() Parent of all children created by this interface.INTERNAL API 
 - 
lookupRootakka.actor.InternalActorRef lookupRoot() INTERNAL API
 - 
providerActorRefProvider provider() INTERNAL API
 - 
stopvoid stop(ActorRef actor) Stop the actor pointed to by the givenActorRef; this is an asynchronous operation, i.e. involves a message send. If this method is applied to theselfreference from inside an Actor then that Actor is guaranteed to not process any further messages after this call; please note that the processing of the current message will continue, this method does not immediately terminate this actor.
 - 
systemImplakka.actor.ActorSystemImpl systemImpl() INTERNAL API
 
- 
 
-