|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface ActorSystem
Main class of the framework responsible for management of actors.
| Method Summary | ||
|---|---|---|
|
createActor(Class<T> actorType)
Creates actor with default name. |
|
|
createActor(Class<T> actorType,
String name)
Creates actor with supplied name. |
|
|
createActor(Class<T> actorType,
String name,
Object... parameters)
Creates actor with supplied name. Actor must define a constructor with a list of parameters matching list of this method parameters |
|
Option<ActorRef> |
find(String name)
Searches for an actor by its name |
|
void |
stop()
Stops ActorSystem. |
|
void |
stopWithCallback(ActorSystemStopCallback callback)
Stops ActorSystem. |
|
| Method Detail |
|---|
Option<ActorRef> find(String name)
name - name of the actor to find
ActorRef wrapped in Option<T extends Actor> ActorRef createActor(Class<T> actorType)
Creates actor with default name.
Actor must have default constructor.
This actor will not be accessible through find(String) method, so returned reference
should be stored and used.
T - Class of the actoractorType - Class of the actor to be created
<T extends Actor> ActorRef createActor(Class<T> actorType,
String name)
T - Class of the actoractorType - Class of the actor to be createdname - Name of the actor
<T extends Actor> ActorRef createActor(Class<T> actorType,
String name,
Object... parameters)
T - Class of the actoractorType - Class of the actor to be createdname - Name of the actorparameters - List of parameters to be passed to actor's constructor
void stopWithCallback(ActorSystemStopCallback callback)
ActorSystemStopCallback.onStopped() method
callback - Callback to be called when all actors in the system have terminatedvoid stop()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||