Creates an ActorRef out of the Actor.
Creates an ActorRef out of the Actor. Allows you to pass in a factory (Creator<Actor>) that creates the Actor. Please note that this function can be invoked multiple times if for example the Actor is supervised and needs to be restarted.
This function should NOT be used for remote actors. JAVA API
Creates an ActorRef out of the Actor.
Creates an ActorRef out of the Actor. Allows you to pass in a factory function that creates the Actor. Please note that this function can be invoked multiple times if for example the Actor is supervised and needs to be restarted.
This function should NOT be used for remote actors.
import Actor._ val actor = actorOf(new MyActor) actor.start() actor ! message actor.stop()You can create and start the actor in one statement like this:
val actor = actorOf(new MyActor).start()
Creates an ActorRef out of the Actor of the specified Class.
Creates an ActorRef out of the Actor of the specified Class.
import Actor._ val actor = actorOf(classOf[MyActor]) actor.start() actor ! message actor.stop()You can create and start the actor in one statement like this:
val actor = actorOf(classOf[MyActor]).start()
Creates an ActorRef out of the Actor with type T.
Creates an ActorRef out of the Actor with type T.
import Actor._ val actor = actorOf[MyActor] actor.start() actor ! message actor.stop()You can create and start the actor in one statement like this:
val actor = actorOf[MyActor].start()
Adds the listener
this this registry's listener list.
Adds the listener
this this registry's listener list.
The listener
is started by this method if manageLifeCycleOfListeners yields true.
Execute f
with each listener as argument.
Execute f
with each listener as argument. ActorInitializationException is not handled.
Implicitly converts the given Future[_] to a AnyOptionAsTypedOption which offers the method as[T]
to convert an Option[Any] to an Option[T].
Implicitly converts the given Future[_] to a AnyOptionAsTypedOption which offers the method as[T]
to convert an Option[Any] to an Option[T].
This means that the following code is equivalent:
(actor !! "foo").as[Int] (Deprecated)
and
(actor !!! "foo").as[Int] (Recommended)
Checks if a specific listener is registered.
Checks if a specific listener is registered. ActorInitializationException leads to removal of listener if that one isShutdown.
Specifies whether listeners should be started when added and stopped when removed or not
Specifies whether listeners should be started when added and stopped when removed or not
Removes the listener
this this registry's listener list.
Removes the listener
this this registry's listener list.
The listener
is stopped by this method if manageLifeCycleOfListeners yields true.
Use to spawn out a block of code in an event-driven actor.
Use to spawn out a block of code in an event-driven actor. Will shut actor down when the block has been executed.
NOTE: If used from within an Actor then has to be qualified with 'Actor.spawn' since there is a method 'spawn[ActorType]' in the Actor trait already. Example:
import Actor.{spawn} spawn { ... // do stuff }
Implicitly converts the given Option[Any] to a AnyOptionAsTypedOption which offers the method as[T]
to convert an Option[Any] to an Option[T].
Implicitly converts the given Option[Any] to a AnyOptionAsTypedOption which offers the method as[T]
to convert an Option[Any] to an Option[T].
Actor factory module with factory methods for creating various kinds of Actors.