Class ActorSystemStub

    • Constructor Detail

      • ActorSystemStub

        public ActorSystemStub​(java.lang.String name)
    • Method Detail

      • address

        public Address address()
        Description copied from class: ActorSystem
        Obtains the external address of the default transport.

        Consider differences in clustered and non-clustered ActorSystems. For a non-clustered ActorSystem, this will return an address without host and port. For a clustered ActorSystem, this will return the address that other nodes can use to communicate with this node.

        Specified by:
        address in class ActorSystem<scala.runtime.Nothing$>
      • deadLetters

        public <U> ActorRef<U> deadLetters()
        Description copied from class: ActorSystem
        The deadLetter address is a destination that will accept (and discard) every message sent to it.
        Specified by:
        deadLetters in class ActorSystem<scala.runtime.Nothing$>
      • deadLettersInbox

        public DebugRef<java.lang.Object> deadLettersInbox()
      • dispatchers

        public Dispatchers dispatchers()
        Description copied from class: ActorSystem
        Facilities for lookup up thread-pools from configuration.
        Specified by:
        dispatchers in class ActorSystem<scala.runtime.Nothing$>
      • dynamicAccess

        public DynamicAccess dynamicAccess()
        Description copied from class: ActorSystem
        ClassLoader wrapper which is used for reflective accesses internally. This is set to use the context class loader, if one is set, or the class loader which loaded the ActorSystem implementation. The context class loader is also set on all threads created by the ActorSystem, if one was set during creation.
        Specified by:
        dynamicAccess in class ActorSystem<scala.runtime.Nothing$>
      • executionContext

        public scala.concurrent.ExecutionContextExecutor executionContext()
        Description copied from class: ActorSystem
        The default thread pool of this ActorSystem, configured with settings in akka.actor.default-dispatcher.
        Specified by:
        executionContext in class ActorSystem<scala.runtime.Nothing$>
      • extension

        public <T extends Extension> T extension​(ExtensionId<T> ext)
        Description copied from interface: Extensions
        Returns the payload that is associated with the provided extension throws an IllegalStateException if it is not registered. This method can potentially block, waiting for the initialization of the payload, if is in the process of registration from another Thread of execution
        Specified by:
        extension in interface Extensions
      • getWhenTerminated

        public java.util.concurrent.CompletionStage<Done> getWhenTerminated()
        Description copied from class: ActorSystem
        Java API: Returns a CompletionStage which will be completed after the ActorSystem has been terminated and termination hooks have been executed. The ActorSystem can be stopped with ActorSystem.terminate or by stopping the guardian actor.

        Be careful to not schedule any operations, such as thenRunAsync, on the dispatchers (Executor) of this actor system as they will have been shut down before this CompletionStage completes.

        Specified by:
        getWhenTerminated in class ActorSystem<scala.runtime.Nothing$>
      • hasExtension

        public boolean hasExtension​(ExtensionId<? extends Extension> ext)
        Description copied from interface: Extensions
        Returns whether the specified extension is already registered, this method can potentially block, waiting for the initialization of the payload, if is in the process of registration from another Thread of execution
        Specified by:
        hasExtension in interface Extensions
      • ignoreRef

        public <U> ActorRef<U> ignoreRef()
        Description copied from class: ActorSystem
        An ActorRef that ignores any incoming messages.
        Specified by:
        ignoreRef in class ActorSystem<scala.runtime.Nothing$>
      • isLocal

        public boolean isLocal()
        Specified by:
        isLocal in interface ActorRefImpl<scala.runtime.Nothing$>
      • isTerminated

        public boolean isTerminated()
        Specified by:
        isTerminated in interface InternalRecipientRef<scala.runtime.Nothing$>
        Returns:
        true if the actor is locally known to be terminated, false if alive or uncertain.
      • log

        public org.slf4j.Logger log()
        Description copied from class: ActorSystem
        A Logger that can be used to emit log messages without specifying a more detailed source. Typically it is desirable to use the dedicated Logger available from each Actor&rsquo;s TypedActorContext as that ties the log entries to the actor.
        Specified by:
        log in class ActorSystem<scala.runtime.Nothing$>
      • logConfiguration

        public void logConfiguration()
        Description copied from class: ActorSystem
        Log the configuration.
        Specified by:
        logConfiguration in class ActorSystem<scala.runtime.Nothing$>
      • name

        public java.lang.String name()
        Description copied from class: ActorSystem
        The name of this actor system, used to distinguish multiple ones within the same JVM & class loader.
        Specified by:
        name in class ActorSystem<scala.runtime.Nothing$>
      • path

        public ActorPath path()
        Description copied from interface: ActorRef
        The hierarchical path name of the referenced Actor. The lifecycle of the ActorRef is fully contained within the lifecycle of the ActorPath and more than one Actor instance can exist with the same path at different points in time, but not concurrently.
        Specified by:
        path in interface ActorRef<scala.runtime.Nothing$>
      • printTree

        public java.lang.String printTree()
        Description copied from class: ActorSystem
        Create a string representation of the actor hierarchy within this system for debugging purposes.

        The format of the string is subject to change, i.e. no stable &ldquo;API&rdquo;.

        Specified by:
        printTree in class ActorSystem<scala.runtime.Nothing$>
      • registerExtension

        public <T extends Extension> T registerExtension​(ExtensionId<T> ext)
        Description copied from interface: Extensions
        Registers the provided extension and creates its payload, if this extension isn't already registered This method has putIfAbsent-semantics, this method can potentially block, waiting for the initialization of the payload, if is in the process of registration from another Thread of execution
        Specified by:
        registerExtension in interface Extensions
      • scheduler

        public Scheduler scheduler()
        Description copied from class: ActorSystem
        A generic scheduler that can initiate the execution of tasks after some delay. It is recommended to use the ActorContext&rsquo;s scheduling capabilities for sending messages to actors instead of registering a Runnable for execution using this facility.
        Specified by:
        scheduler in class ActorSystem<scala.runtime.Nothing$>
      • settings

        public Settings settings()
        Description copied from class: ActorSystem
        The core settings extracted from the supplied configuration.
        Specified by:
        settings in class ActorSystem<scala.runtime.Nothing$>
      • startTime

        public long startTime()
        Description copied from class: ActorSystem
        Start-up time in milliseconds since the epoch.
        Specified by:
        startTime in class ActorSystem<scala.runtime.Nothing$>
      • systemActorOf

        public <U> ActorRef<U> systemActorOf​(Behavior<U> behavior,
                                             java.lang.String name,
                                             Props props)
        Description copied from class: ActorSystem
        Create an actor in the "/system" namespace. This actor will be shut down during system.terminate only after all user actors have terminated.

        This is only intended to be used by libraries (and Akka itself). Applications should use ordinary spawn.

        Specified by:
        systemActorOf in class ActorSystem<scala.runtime.Nothing$>
      • tell

        public void tell​(scala.runtime.Nothing$ message)
        Description copied from interface: ActorRef
        Send a message to the Actor referenced by this ActorRef using *at-most-once* messaging semantics.
        Specified by:
        tell in interface ActorRef<scala.runtime.Nothing$>
        Specified by:
        tell in interface RecipientRef<scala.runtime.Nothing$>
      • terminate

        public void terminate()
        Description copied from class: ActorSystem
        Terminates this actor system by running CoordinatedShutdown with reason akka.actor.CoordinatedShutdown.ActorSystemTerminateReason.

        If akka.coordinated-shutdown.run-by-actor-system-terminate is configured to off it will not run CoordinatedShutdown, but the ActorSystem and its actors will still be terminated.

        This will stop the guardian actor, which in turn will recursively stop all its child actors, and finally the system guardian (below which the logging actors reside).

        This is an asynchronous operation and completion of the termination can be observed with ActorSystem.whenTerminated or ActorSystem.getWhenTerminated.

        Specified by:
        terminate in class ActorSystem<scala.runtime.Nothing$>
      • threadFactory

        public java.util.concurrent.ThreadFactory threadFactory()
        Description copied from class: ActorSystem
        A ThreadFactory that can be used if the transport needs to create any Threads
        Specified by:
        threadFactory in class ActorSystem<scala.runtime.Nothing$>
      • uptime

        public long uptime()
        Description copied from class: ActorSystem
        Up-time of this actor system in seconds.
        Specified by:
        uptime in class ActorSystem<scala.runtime.Nothing$>
      • whenTerminated

        public scala.concurrent.Future<Done> whenTerminated()
        Description copied from class: ActorSystem
        Scala API: Returns a Future which will be completed after the ActorSystem has been terminated. The ActorSystem can be stopped with ActorSystem.terminate or by stopping the guardian actor.

        Be careful to not schedule any operations, such as onComplete, on the dispatchers (ExecutionContext) of this actor system as they will have been shut down before this future completes.

        Specified by:
        whenTerminated in class ActorSystem<scala.runtime.Nothing$>