Package akka.actor

Interface ActorRefFactory

    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      ActorRef 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).
      ActorRef 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 “$”.
      ActorSelection actorSelection​(ActorPath path)
      Construct an ActorSelection from the given path, which is parsed for wildcards (these are replaced by regular expressions internally).
      ActorSelection actorSelection​(java.lang.String path)
      Construct an ActorSelection from the given path, which is parsed for wildcards (these are replaced by regular expressions internally).
      scala.concurrent.ExecutionContextExecutor dispatcher()
      Returns the default MessageDispatcher associated with this ActorRefFactory
      akka.actor.InternalActorRef guardian()
      Parent of all children created by this interface.
      akka.actor.InternalActorRef lookupRoot()
      INTERNAL API
      ActorRefProvider provider()
      INTERNAL API
      void stop​(ActorRef actor)
      Stop the actor pointed to by the given ActorRef; this is an asynchronous operation, i.e.
      akka.actor.ActorSystemImpl systemImpl()
      INTERNAL API
    • Method Detail

      • actorOf

        ActorRef 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 Props for details on how to obtain a Props object.

        Throws:
        ConfigurationException - if deployment, dispatcher or mailbox configuration is wrong
        java.lang.UnsupportedOperationException - if invoked on an ActorSystem that uses a custom user guardian
      • actorOf

        ActorRef 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, an InvalidActorNameException is thrown.

        See Props for details on how to obtain a Props object.

        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
      • actorSelection

        ActorSelection actorSelection​(java.lang.String path)
        Construct an 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.
      • actorSelection

        ActorSelection actorSelection​(ActorPath path)
        Construct an 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.
      • dispatcher

        scala.concurrent.ExecutionContextExecutor dispatcher()
        Returns the default MessageDispatcher associated with this ActorRefFactory
      • guardian

        akka.actor.InternalActorRef guardian()
        Parent of all children created by this interface.

        INTERNAL API

      • lookupRoot

        akka.actor.InternalActorRef lookupRoot()
        INTERNAL API
      • stop

        void stop​(ActorRef actor)
        Stop the actor pointed to by the given 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.
      • systemImpl

        akka.actor.ActorSystemImpl systemImpl()
        INTERNAL API