public interface ActorSystem<T>
ActorSystem$
apply
from a Props
object that describes the root
Actor of this hierarchy and which will create all other Actors beneath it.
A system also implements the ActorRef
type, and sending a message to
the system directs that message to the root Actor.Modifier and Type | Method and Description |
---|---|
<U> ActorRef<U> |
deadLetters()
The deadLetter address is a destination that will accept (and discard)
every message sent to it.
|
Dispatchers |
dispatchers()
Facilities for lookup up thread-pools from configuration.
|
DynamicAccess |
dynamicAccess()
ClassLoader wrapper which is used for reflective accesses internally.
|
EventStream |
eventStream()
Main event bus of this actor system, used for example for logging.
|
scala.concurrent.ExecutionContextExecutor |
executionContext()
The default thread pool of this ActorSystem, configured with settings in
akka.actor.default-dispatcher . |
LoggingAdapter |
log()
A
LoggingAdapter that can be used to emit log messages
without specifying a more detailed source. |
void |
logConfiguration()
Log the configuration.
|
LoggingFilter |
logFilter()
A reference to this system’s logFilter, which filters usage of the
log()
LoggingAdapter such that only permissible messages are sent
via the eventStream() . |
java.lang.String |
name()
The name of this actor system, used to distinguish multiple ones within
the same JVM & class loader.
|
java.lang.String |
printTree()
Create a string representation of the actor hierarchy within this system.
|
Scheduler |
scheduler()
A generic scheduler that can initiate the execution of tasks after some delay.
|
Settings |
settings()
The core settings extracted from the supplied configuration.
|
long |
startTime()
Start-up time in milliseconds since the epoch.
|
<U> scala.concurrent.Future<ActorRef<U>> |
systemActorOf(Behavior<U> behavior,
java.lang.String name,
DeploymentConfig deployment,
Timeout timeout)
Ask the system guardian of this system to create an actor from the given
behavior and deployment and with the given name.
|
scala.concurrent.Future<Terminated> |
terminate()
Terminates this actor system.
|
java.util.concurrent.ThreadFactory |
threadFactory()
A ThreadFactory that can be used if the transport needs to create any Threads
|
long |
uptime()
Up-time of this actor system in seconds.
|
scala.concurrent.Future<Terminated> |
whenTerminated()
Returns a Future which will be completed after the ActorSystem has been terminated
and termination hooks have been executed.
|
java.lang.String name()
Settings settings()
void logConfiguration()
LoggingFilter logFilter()
log()
LoggingAdapter
such that only permissible messages are sent
via the eventStream()
. The default implementation will just test that
the message is suitable for the current log level.LoggingAdapter log()
LoggingAdapter
that can be used to emit log messages
without specifying a more detailed source. Typically it is desirable to
construct a dedicated LoggingAdapter within each Actor from that Actor’s
ActorRef
in order to identify the log messages.long startTime()
long uptime()
java.util.concurrent.ThreadFactory threadFactory()
DynamicAccess dynamicAccess()
Scheduler scheduler()
EventStream eventStream()
Dispatchers dispatchers()
scala.concurrent.ExecutionContextExecutor executionContext()
akka.actor.default-dispatcher
.scala.concurrent.Future<Terminated> terminate()
scala.concurrent.Future<Terminated> whenTerminated()
<U> ActorRef<U> deadLetters()
java.lang.String printTree()
The format of the string is subject to change, i.e. no stable “API”.
<U> scala.concurrent.Future<ActorRef<U>> systemActorOf(Behavior<U> behavior, java.lang.String name, DeploymentConfig deployment, Timeout timeout)
AskPattern$
invocation when asking the guardian.
The returned Future of ActorRef
may be converted into an ActorRef
to which messages can immediately be sent by using the ActorRef$apply
method.
behavior
- (undocumented)name
- (undocumented)deployment
- (undocumented)timeout
- (undocumented)