This decorator adds invocation logging to a Receive function.
A Receive is a convenience type that defines actor message behavior currently modeled as a PartialFunction[Any, Unit].
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.
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.
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()
Wrap a Receive partial function in a logging enclosure, which sends a debug message to the EventHandler each time before a message is matched.
Wrap a Receive partial function in a logging enclosure, which sends a debug message to the EventHandler each time before a message is matched. This includes messages which are not handled.
def receive = loggable {
case x => ...
}
This method does NOT modify the given Receive unless akka.actor.debug.receive is set within akka.conf.
Handle to the ActorRegistry.
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.