akka.actor

Actor

object Actor extends AnyRef

Actor factory module with factory methods for creating various kinds of Actors.

Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. Hide All
  2. Show all
  1. Actor
  2. AnyRef
  3. Any
Visibility
  1. Public
  2. All

Type Members

  1. class LoggingReceive extends PartialFunction[Any, Unit]

    This decorator adds invocation logging to a Receive function.

  2. type Receive = PartialFunction[Any, Unit]

    A Receive is a convenience type that defines actor message behavior currently modeled as a PartialFunction[Any, Unit].

  3. case class Timeout (duration: Duration) extends Product with Serializable

Value Members

  1. def != (arg0: AnyRef): Boolean

    Attributes
    final
    Definition Classes
    AnyRef
  2. def != (arg0: Any): Boolean

    Attributes
    final
    Definition Classes
    Any
  3. def ## (): Int

    Attributes
    final
    Definition Classes
    AnyRef → Any
  4. def == (arg0: AnyRef): Boolean

    Attributes
    final
    Definition Classes
    AnyRef
  5. def == (arg0: Any): Boolean

    Attributes
    final
    Definition Classes
    Any
  6. object LoggingReceive extends AnyRef

  7. object Timeout extends Serializable

  8. def actorOf (creator: Creator[Actor]): ActorRef

    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

  9. def actorOf (factory: ⇒ Actor): ActorRef

    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()
    

  10. def actorOf (clazz: Class[_ <: akka.actor.Actor]): ActorRef

    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()
    

  11. def actorOf [T <: Actor] (implicit arg0: Manifest[T]): ActorRef

    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()
    

  12. def asInstanceOf [T0] : T0

    Attributes
    final
    Definition Classes
    Any
  13. def clone (): AnyRef

    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws()
  14. val defaultTimeout : Timeout

  15. def eq (arg0: AnyRef): Boolean

    Attributes
    final
    Definition Classes
    AnyRef
  16. def equals (arg0: Any): Boolean

    Definition Classes
    AnyRef → Any
  17. def finalize (): Unit

    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws()
  18. def getClass (): java.lang.Class[_]

    Attributes
    final
    Definition Classes
    AnyRef → Any
  19. def hashCode (): Int

    Definition Classes
    AnyRef → Any
  20. def isInstanceOf [T0] : Boolean

    Attributes
    final
    Definition Classes
    Any
  21. def loggable (self: AnyRef)(r: Receive): Receive

    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.

  22. def ne (arg0: AnyRef): Boolean

    Attributes
    final
    Definition Classes
    AnyRef
  23. def notify (): Unit

    Attributes
    final
    Definition Classes
    AnyRef
  24. def notifyAll (): Unit

    Attributes
    final
    Definition Classes
    AnyRef
  25. val registry : ActorRegistry

    Handle to the ActorRegistry.

  26. lazy val remote : RemoteSupport

  27. def spawn (body: ⇒ Unit)(implicit dispatcher: MessageDispatcher = Dispatchers.defaultGlobalDispatcher): Unit

    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
    }
    

  28. def synchronized [T0] (arg0: ⇒ T0): T0

    Attributes
    final
    Definition Classes
    AnyRef
  29. implicit def toAnyOptionAsTypedOption (anyOption: Option[Any]): AnyOptionAsTypedOption

    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].

    Attributes
    implicit
  30. def toString (): String

    Definition Classes
    AnyRef → Any
  31. def wait (): Unit

    Attributes
    final
    Definition Classes
    AnyRef
    Annotations
    @throws()
  32. def wait (arg0: Long, arg1: Int): Unit

    Attributes
    final
    Definition Classes
    AnyRef
    Annotations
    @throws()
  33. def wait (arg0: Long): Unit

    Attributes
    final
    Definition Classes
    AnyRef
    Annotations
    @throws()

Inherited from AnyRef

Inherited from Any