trait ActorRefFactory extends AnyRef
Interface implemented by ActorSystem and ActorContext, the only two places from which you can get fresh actors.
- Annotations
- @implicitNotFound()
- Source
- ActorRefProvider.scala
- Alphabetic
- By Inheritance
- ActorRefFactory
- AnyRef
- Any
- by any2stringadd
- by StringFormat
- by Ensuring
- by ArrowAssoc
- Hide All
- Show All
- Public
- Protected
Abstract Value Members
- abstract def actorOf(props: Props, name: String): ActorRef
Create new actor as child of this context with the given name, which must not be null, empty or start with “$”.
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, an
InvalidActorNameException
is thrown.See akka.actor.Props for details on how to obtain a
Props
object.- Exceptions thrown
UnsupportedOperationException
if invoked on an ActorSystem that uses a custom user guardianakka.ConfigurationException
if deployment, dispatcher or mailbox configuration is wrongakka.actor.InvalidActorNameException
if the given name is invalid or already in use
- abstract def actorOf(props: Props): ActorRef
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).
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 akka.actor.Props for details on how to obtain a
Props
object.- Exceptions thrown
UnsupportedOperationException
if invoked on an ActorSystem that uses a custom user guardianakka.ConfigurationException
if deployment, dispatcher or mailbox configuration is wrong
- implicit abstract def dispatcher: ExecutionContextExecutor
Returns the default MessageDispatcher associated with this ActorRefFactory
- abstract def stop(actor: ActorRef): Unit
Stop the actor pointed to by the given akka.actor.ActorRef; this is an asynchronous operation, i.e.
Stop the actor pointed to by the given akka.actor.ActorRef; this is an asynchronous operation, i.e. involves a message send. If this method is applied to the
self
reference 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.
Concrete Value Members
- def actorSelection(path: ActorPath): ActorSelection
Construct an akka.actor.ActorSelection from the given path, which is parsed for wildcards (these are replaced by regular expressions internally).
Construct an akka.actor.ActorSelection from 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.
- def actorSelection(path: String): ActorSelection
Construct an akka.actor.ActorSelection from the given path, which is parsed for wildcards (these are replaced by regular expressions internally).
Construct an akka.actor.ActorSelection from 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.