Class ActorSystemStub
- java.lang.Object
-
- akka.actor.typed.ActorSystem<scala.runtime.Nothing$>
-
- akka.actor.testkit.typed.internal.ActorSystemStub
-
- All Implemented Interfaces:
ClassicActorSystemProvider,ActorRef<scala.runtime.Nothing$>,Extensions,ActorRefImpl<scala.runtime.Nothing$>,InternalRecipientRef<scala.runtime.Nothing$>,RecipientRef<scala.runtime.Nothing$>,java.io.Serializable,java.lang.Comparable<ActorRef<?>>
public final class ActorSystemStub extends ActorSystem<scala.runtime.Nothing$> implements ActorRef<scala.runtime.Nothing$>, ActorRefImpl<scala.runtime.Nothing$>, InternalRecipientRef<scala.runtime.Nothing$>
INTERNAL API- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface akka.actor.typed.ActorRef
ActorRef.ActorRefOps<T>, ActorRef.ActorRefOps$
-
Nested classes/interfaces inherited from interface akka.actor.typed.RecipientRef
RecipientRef.RecipientRefOps<T>, RecipientRef.RecipientRefOps$
-
-
Constructor Summary
Constructors Constructor Description ActorSystemStub(java.lang.String name)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description scala.runtime.Nothing$classicSystem()ControlledExecutorcontrolledExecutor()<U> ActorRef<U>deadLetters()The deadLetter address is a destination that will accept (and discard) every message sent to it.DebugRef<java.lang.Object>deadLettersInbox()Dispatchersdispatchers()Facilities for lookup up thread-pools from configuration.DynamicAccessdynamicAccess()ClassLoader wrapper which is used for reflective accesses internally.scala.concurrent.ExecutionContextExecutorexecutionContext()The default thread pool of this ActorSystem, configured with settings inakka.actor.default-dispatcher.<T extends Extension>
Textension(ExtensionId<T> ext)Returns the payload that is associated with the provided extension throws an IllegalStateException if it is not registered.java.util.concurrent.CompletionStage<Done>getWhenTerminated()Java API: Returns a CompletionStage which will be completed after the ActorSystem has been terminated and termination hooks have been executed.booleanhasExtension(ExtensionId<? extends Extension> ext)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 executionbooleanisLocal()booleanisTerminated()Loggerlog()ALoggerthat can be used to emit log messages without specifying a more detailed source.voidlogConfiguration()Log the configuration.java.lang.Stringname()ActorPathpath()The hierarchical path name of the referenced Actor.java.lang.StringprintTree()Create a string representation of the actor hierarchy within this system for debugging purposes.ActorRefProviderprovider()Get a reference to the actor ref provider which created this ref.<T extends Extension>
TregisterExtension(ExtensionId<T> ext)Schedulerscheduler()A generic scheduler that can initiate the execution of tasks after some delay.voidsendSystem(SystemMessage signal)Settingssettings()The core settings extracted from the supplied configuration.longstartTime()Start-up time in milliseconds since the epoch.<U> scala.concurrent.Future<ActorRef<U>>systemActorOf(Behavior<U> behavior, java.lang.String name, Props props, Timeout timeout)Create an actor in the "/system" namespace.voidtell(scala.runtime.Nothing$ message)Send a message to the Actor referenced by this ActorRef using *at-most-once* messaging semantics.voidterminate()Terminates this actor system.java.util.concurrent.ThreadFactorythreadFactory()A ThreadFactory that can be used if the transport needs to create any Threadslonguptime()Up-time of this actor system in seconds.scala.concurrent.Future<Done>whenTerminated()Scala API: Returns a Future which will be completed after the ActorSystem has been terminated and termination hooks have been executed.-
Methods inherited from class akka.actor.typed.ActorSystem
apply, apply, apply, apply, apply$default$4, create, create, create, create, receptionist, systemActorOf$default$3, wrap
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface akka.actor.typed.ActorRef
writeReplace
-
Methods inherited from interface akka.actor.typed.internal.ActorRefImpl
compareTo, equals, hashCode, narrow, toString, unsafeUpcast
-
-
-
-
Method Detail
-
classicSystem
public scala.runtime.Nothing$ classicSystem()
- Specified by:
classicSystemin interfaceClassicActorSystemProvider
-
controlledExecutor
public ControlledExecutor controlledExecutor()
-
deadLetters
public <U> ActorRef<U> deadLetters()
Description copied from class:ActorSystemThe deadLetter address is a destination that will accept (and discard) every message sent to it.- Specified by:
deadLettersin classActorSystem<scala.runtime.Nothing$>- Returns:
- (undocumented)
-
deadLettersInbox
public DebugRef<java.lang.Object> deadLettersInbox()
-
dispatchers
public Dispatchers dispatchers()
Description copied from class:ActorSystemFacilities for lookup up thread-pools from configuration.- Specified by:
dispatchersin classActorSystem<scala.runtime.Nothing$>- Returns:
- (undocumented)
-
dynamicAccess
public DynamicAccess dynamicAccess()
Description copied from class:ActorSystemClassLoader 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:
dynamicAccessin classActorSystem<scala.runtime.Nothing$>- Returns:
- (undocumented)
-
executionContext
public scala.concurrent.ExecutionContextExecutor executionContext()
Description copied from class:ActorSystemThe default thread pool of this ActorSystem, configured with settings inakka.actor.default-dispatcher.- Specified by:
executionContextin classActorSystem<scala.runtime.Nothing$>- Returns:
- (undocumented)
-
extension
public <T extends Extension> T extension(ExtensionId<T> ext)
Description copied from interface:ExtensionsReturns 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:
extensionin interfaceExtensions- Parameters:
ext- (undocumented)- Returns:
- (undocumented)
-
getWhenTerminated
public java.util.concurrent.CompletionStage<Done> getWhenTerminated()
Description copied from class:ActorSystemJava API: Returns a CompletionStage which will be completed after the ActorSystem has been terminated and termination hooks have been executed. TheActorSystemcan be stopped withActorSystem.terminateor by stopping the guardian actor.- Specified by:
getWhenTerminatedin classActorSystem<scala.runtime.Nothing$>- Returns:
- (undocumented)
-
hasExtension
public boolean hasExtension(ExtensionId<? extends Extension> ext)
Description copied from interface:ExtensionsReturns 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:
hasExtensionin interfaceExtensions- Parameters:
ext- (undocumented)- Returns:
- (undocumented)
-
isLocal
public boolean isLocal()
- Specified by:
isLocalin interfaceActorRefImpl<scala.runtime.Nothing$>
-
isTerminated
public boolean isTerminated()
- Specified by:
isTerminatedin interfaceInternalRecipientRef<scala.runtime.Nothing$>- Returns:
trueif the actor is locally known to be terminated,falseif alive or uncertain.
-
log
public Logger log()
Description copied from class:ActorSystemALoggerthat can be used to emit log messages without specifying a more detailed source. Typically it is desirable to use the dedicatedLoggeravailable from each Actor’sTypedActorContextas that ties the log entries to the actor.- Specified by:
login classActorSystem<scala.runtime.Nothing$>- Returns:
- (undocumented)
-
logConfiguration
public void logConfiguration()
Description copied from class:ActorSystemLog the configuration.- Specified by:
logConfigurationin classActorSystem<scala.runtime.Nothing$>
-
name
public java.lang.String name()
- Specified by:
namein classActorSystem<scala.runtime.Nothing$>
-
path
public ActorPath path()
Description copied from interface:ActorRefThe hierarchical path name of the referenced Actor. The lifecycle of the ActorRef is fully contained within the lifecycle of theActorPathand more than one Actor instance can exist with the same path at different points in time, but not concurrently.
-
printTree
public java.lang.String printTree()
Description copied from class:ActorSystemCreate 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 “API”.
- Specified by:
printTreein classActorSystem<scala.runtime.Nothing$>- Returns:
- (undocumented)
-
provider
public ActorRefProvider provider()
Description copied from interface:InternalRecipientRefGet a reference to the actor ref provider which created this ref.- Specified by:
providerin interfaceInternalRecipientRef<scala.runtime.Nothing$>- Returns:
- (undocumented)
-
registerExtension
public <T extends Extension> T registerExtension(ExtensionId<T> ext)
- Specified by:
registerExtensionin interfaceExtensions
-
scheduler
public Scheduler scheduler()
Description copied from class:ActorSystemA generic scheduler that can initiate the execution of tasks after some delay. It is recommended to use the ActorContext’s scheduling capabilities for sending messages to actors instead of registering a Runnable for execution using this facility.- Specified by:
schedulerin classActorSystem<scala.runtime.Nothing$>- Returns:
- (undocumented)
-
sendSystem
public void sendSystem(SystemMessage signal)
- Specified by:
sendSystemin interfaceActorRefImpl<scala.runtime.Nothing$>
-
settings
public Settings settings()
Description copied from class:ActorSystemThe core settings extracted from the supplied configuration.- Specified by:
settingsin classActorSystem<scala.runtime.Nothing$>- Returns:
- (undocumented)
-
startTime
public long startTime()
Description copied from class:ActorSystemStart-up time in milliseconds since the epoch.- Specified by:
startTimein classActorSystem<scala.runtime.Nothing$>- Returns:
- (undocumented)
-
systemActorOf
public <U> scala.concurrent.Future<ActorRef<U>> systemActorOf(Behavior<U> behavior, java.lang.String name, Props props, Timeout timeout)
Description copied from class:ActorSystemCreate an actor in the "/system" namespace. This actor will be shut down during system.terminate only after all user actors have terminated.The returned Future of
ActorRefmay be converted into anActorRefto which messages can immediately be sent by using theActorRef.applymethod.- Specified by:
systemActorOfin classActorSystem<scala.runtime.Nothing$>- Parameters:
behavior- (undocumented)name- (undocumented)props- (undocumented)timeout- (undocumented)- Returns:
- (undocumented)
-
tell
public void tell(scala.runtime.Nothing$ message)
Description copied from interface:ActorRefSend a message to the Actor referenced by this ActorRef using *at-most-once* messaging semantics.- Specified by:
tellin interfaceActorRef<scala.runtime.Nothing$>- Specified by:
tellin interfaceRecipientRef<scala.runtime.Nothing$>- Parameters:
message- (undocumented)
-
terminate
public void terminate()
Description copied from class:ActorSystemTerminates this actor system. This will stop the guardian actor, which in turn will recursively stop all its child actors, then the system guardian (below which the logging actors reside).This is an asynchronous operation and completion of the termination can be observed with
ActorSystem.whenTerminatedorActorSystem.getWhenTerminated.- Specified by:
terminatein classActorSystem<scala.runtime.Nothing$>
-
threadFactory
public java.util.concurrent.ThreadFactory threadFactory()
Description copied from class:ActorSystemA ThreadFactory that can be used if the transport needs to create any Threads- Specified by:
threadFactoryin classActorSystem<scala.runtime.Nothing$>- Returns:
- (undocumented)
-
uptime
public long uptime()
Description copied from class:ActorSystemUp-time of this actor system in seconds.- Specified by:
uptimein classActorSystem<scala.runtime.Nothing$>- Returns:
- (undocumented)
-
whenTerminated
public scala.concurrent.Future<Done> whenTerminated()
Description copied from class:ActorSystemScala API: Returns a Future which will be completed after the ActorSystem has been terminated and termination hooks have been executed. TheActorSystemcan be stopped withActorSystem.terminateor by stopping the guardian actor.- Specified by:
whenTerminatedin classActorSystem<scala.runtime.Nothing$>- Returns:
- (undocumented)
-
-