|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object akka.actor.ActorSystem akka.actor.ExtendedActorSystem akka.actor.ActorSystemImpl
public class ActorSystemImpl
Nested Class Summary | |
---|---|
class |
ActorSystemImpl.TerminationCallbacks
|
Nested classes/interfaces inherited from class akka.actor.ActorSystem |
---|
ActorSystem.Settings |
Constructor Summary | |
---|---|
ActorSystemImpl(java.lang.String name,
com.typesafe.config.Config applicationConfig,
java.lang.ClassLoader classLoader,
scala.Option<scala.concurrent.ExecutionContext> defaultExecutionContext)
|
Method Summary | ||
---|---|---|
void |
abort()
This kind of shutdown attempts to bring the system down and release its resources more forcefully than plain shutdown. |
|
boolean |
aborting()
|
|
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 “$”. |
|
void |
awaitTermination()
Block current thread until the system has been shutdown. |
|
void |
awaitTermination(scala.concurrent.duration.Duration timeout)
Block current thread until the system has been shutdown, or the specified timeout has elapsed. |
|
protected DynamicAccess |
createDynamicAccess()
This is an extension point: by overriding this method, subclasses can control all reflection activities of an actor system. |
|
protected Scheduler |
createScheduler()
Create the scheduler service. |
|
ActorRef |
deadLetters()
Actor reference where messages are re-routed to which were addressed to stopped or non-existing actors. |
|
scala.concurrent.ExecutionContextExecutor |
dispatcher()
Default dispatcher as configured. |
|
Dispatchers |
dispatchers()
Helper object for looking up configured dispatchers. |
|
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. |
|
|
extension(ExtensionId<T> ext)
Returns the payload that is associated with the provided extension throws an IllegalStateException if it is not registered. |
|
LocalActorRef |
guardian()
The top-level supervisor of all actors created using system.actorOf(...). |
|
boolean |
hasExtension(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 execution |
|
scala.concurrent.ExecutionContext |
internalCallingThreadExecutionContext()
|
|
boolean |
isTerminated()
Query the termination status: if it returns true, all callbacks have run and the ActorSystem has been fully stopped, i.e. |
|
LoggingAdapter |
log()
Convenient logging adapter for logging to the ActorSystem.eventStream . |
|
void |
logConfiguration()
Log the configuration. |
|
InternalActorRef |
lookupRoot()
INTERNAL API |
|
Mailboxes |
mailboxes()
Helper object for looking up configured mailbox types. |
|
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()
For debugging: traverse actor hierarchy and make string representation. |
|
ActorRefProvider |
provider()
The ActorRefProvider is the only entity which creates all actor references within this actor system. |
|
|
registerExtension(ExtensionId<T> ext)
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 |
|
|
registerOnTermination(scala.Function0<T> code)
Register a block of code (callback) to run after ActorSystem.shutdown has been issued and all actors in this actor system have been stopped. |
|
void |
registerOnTermination(java.lang.Runnable code)
Java API: Register a block of code (callback) to run after ActorSystem.shutdown has been issued and all actors in this actor system have been stopped. |
|
Scheduler |
scheduler()
Light-weight scheduler for running asynchronous tasks after some deadline in the future. |
|
ActorSystem.Settings |
settings()
The core settings extracted from the supplied configuration. |
|
void |
shutdown()
Stop this actor system. |
|
ActorSystemImpl |
start()
|
|
void |
stop(ActorRef actor)
Stop the actor pointed to by the given ActorRef ; this is
an asynchronous operation, i.e. |
|
protected void |
stopScheduler()
|
|
ActorRef |
systemActorOf(Props props,
java.lang.String name)
Create an actor in the "/system" namespace. |
|
LocalActorRef |
systemGuardian()
The top-level supervisor of all system-internal services like logging. |
|
protected ActorSystemImpl |
systemImpl()
INTERNAL API |
|
scala.concurrent.Future<scala.runtime.BoxedUnit> |
terminationFuture()
|
|
MonitorableThreadFactory |
threadFactory()
A ThreadFactory that can be used if the transport needs to create any Threads |
|
java.lang.String |
toString()
|
|
protected java.lang.Thread.UncaughtExceptionHandler |
uncaughtExceptionHandler()
|
Methods inherited from class akka.actor.ActorSystem |
---|
apply, apply, apply, apply, apply, child, create, create, create, create, create, descendant, EnvHome, findClassLoader, GlobalHome, startTime, SystemHome, uptime, Version |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface akka.actor.ActorRefFactory |
---|
actorFor, actorFor, actorFor, actorFor, actorSelection, actorSelection |
Constructor Detail |
---|
public ActorSystemImpl(java.lang.String name, com.typesafe.config.Config applicationConfig, java.lang.ClassLoader classLoader, scala.Option<scala.concurrent.ExecutionContext> defaultExecutionContext)
Method Detail |
---|
public java.lang.String name()
ActorSystem
name
in class ActorSystem
public final ActorSystem.Settings settings()
ActorSystem
settings
in class ActorSystem
protected java.lang.Thread.UncaughtExceptionHandler uncaughtExceptionHandler()
public final MonitorableThreadFactory threadFactory()
ExtendedActorSystem
threadFactory
in class ExtendedActorSystem
protected DynamicAccess createDynamicAccess()
public DynamicAccess dynamicAccess()
ExtendedActorSystem
dynamicAccess
in class ExtendedActorSystem
public void logConfiguration()
ActorSystem
logConfiguration
in class ActorSystem
protected ActorSystemImpl systemImpl()
ActorRefFactory
public ActorRef systemActorOf(Props props, java.lang.String name)
ExtendedActorSystem
systemActorOf
in class ExtendedActorSystem
props
- (undocumented)name
- (undocumented)
public ActorRef actorOf(Props props, java.lang.String name)
ActorRefFactory
InvalidActorNameException
is thrown.
See Props
for details on how to obtain a Props
object.
props
- (undocumented)name
- (undocumented)
public ActorRef actorOf(Props props)
ActorRefFactory
See Props
for details on how to obtain a Props
object.
props
- (undocumented)
public void stop(ActorRef actor)
ActorRefFactory
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.
actor
- (undocumented)public EventStream eventStream()
ActorSystem
eventStream
in class ActorSystem
public LoggingAdapter log()
ActorSystem
ActorSystem.eventStream
.
log
in class ActorSystem
public Scheduler scheduler()
ActorSystem
scheduler
in class ActorSystem
public ActorRefProvider provider()
ExtendedActorSystem
provider
in interface ActorRefFactory
provider
in class ExtendedActorSystem
public ActorRef deadLetters()
ActorSystem
deadLetters
in class ActorSystem
public Mailboxes mailboxes()
ActorSystem
mailboxes
in class ActorSystem
public Dispatchers dispatchers()
ActorSystem
dispatchers
in class ActorSystem
public scala.concurrent.ExecutionContextExecutor dispatcher()
ActorSystem
dispatcher
in interface ActorRefFactory
dispatcher
in class ActorSystem
public scala.concurrent.ExecutionContext internalCallingThreadExecutionContext()
public scala.concurrent.Future<scala.runtime.BoxedUnit> terminationFuture()
public InternalActorRef lookupRoot()
ActorRefFactory
public LocalActorRef guardian()
ExtendedActorSystem
guardian
in interface ActorRefFactory
guardian
in class ExtendedActorSystem
public LocalActorRef systemGuardian()
ExtendedActorSystem
systemGuardian
in class ExtendedActorSystem
public ActorSystemImpl start()
public <T> void registerOnTermination(scala.Function0<T> code)
ActorSystem
registerOnTermination
in class ActorSystem
code
- (undocumented)public void registerOnTermination(java.lang.Runnable code)
ActorSystem
registerOnTermination
in class ActorSystem
code
- (undocumented)public void awaitTermination(scala.concurrent.duration.Duration timeout)
ActorSystem
awaitTermination
in class ActorSystem
timeout
- (undocumented)public void awaitTermination()
ActorSystem
awaitTermination
in class ActorSystem
public boolean isTerminated()
ActorSystem
awaitTermination(0 seconds)
would return normally. If this method
returns false
, the status is actually unknown, since it might have
changed since you queried it.
isTerminated
in class ActorSystem
public void shutdown()
ActorSystem
ActorSystem.registerOnTermination
).
shutdown
in class ActorSystem
public boolean aborting()
public void abort()
protected Scheduler createScheduler()
Furthermore, this timer service MUST throw IllegalStateException if it cannot schedule a task. Once scheduled, the task MUST be executed. If executed upon close(), the task may execute before its timeout.
protected void stopScheduler()
public final <T extends Extension> T registerExtension(ExtensionId<T> ext)
ActorSystem
registerExtension
in class ActorSystem
ext
- (undocumented)
public <T extends Extension> T extension(ExtensionId<T> ext)
ActorSystem
extension
in class ActorSystem
ext
- (undocumented)
public boolean hasExtension(ExtensionId<? extends Extension> ext)
ActorSystem
hasExtension
in class ActorSystem
ext
- (undocumented)
public java.lang.String toString()
toString
in class java.lang.Object
public java.lang.String printTree()
ExtendedActorSystem
printTree
in class ExtendedActorSystem
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |