Packages

  • package root
    Definition Classes
    root
  • package akka
    Definition Classes
    root
  • package actor
    Definition Classes
    akka
  • object ActorDSL extends actor.dsl.Inbox with Creators

    This object contains elements which make writing actors and related code more concise, e.g.

    This object contains elements which make writing actors and related code more concise, e.g. when trying out actors in the REPL.

    For the communication of non-actor code with actors, you may use anonymous actors tailored to this job:

    import ActorDSL._
    import scala.concurrent.util.duration._
    
    implicit val system: ActorSystem = ...
    
    implicit val i = inbox()
    someActor ! someMsg // replies will go to `i`
    
    val reply = i.receive()
    val transformedReply = i.select(5 seconds) {
      case x: Int => 2 * x
    }

    The receive and select methods are synchronous, i.e. they block the calling thread until an answer from the actor is received or the timeout expires. The default timeout is taken from configuration item akka.actor.dsl.default-timeout.

    When defining actors in the REPL, say, you may want to have a look at the Act trait:

    import ActorDSL._
    
    val system: ActorSystem = ...
    
    val a = actor(system, "fred")(new Act {
        val b = actor("barney")(new Act {
            ...
          })
    
        become {
          case msg => ...
        }
      })

    Note that actor can be used with an implicit akka.actor.ActorRefFactory as shown with "barney" (where the akka.actor.ActorContext serves this purpose), but since nested declarations share the same lexical context "fred"’s ActorContext would be ambiguous if the akka.actor.ActorSystem were declared implicit (this could also be circumvented by shadowing the name system within "fred").

    Note: If you want to use an Act with Stash, you should use the ActWithStash trait in order to have the actor get the necessary deque-based mailbox setting.

    Definition Classes
    actor
    Annotations
    @deprecated
    Deprecated

    (Since version 2.5.0) deprecated Use the normal actorOf methods defined on ActorSystem and ActorContext to create Actors instead.

  • Act
  • ActWithStash
  • Extension
  • Inbox
  • InboxExtension
c

akka.actor.ActorDSL

Extension

Companion object Extension

class Extension extends actor.Extension with InboxExtension

Attributes
protected
Source
ActorDSL.scala
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. Extension
  2. InboxExtension
  3. Extension
  4. AnyRef
  5. Any
Implicitly
  1. by any2stringadd
  2. by StringFormat
  3. by Ensuring
  4. by ArrowAssoc
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new Extension(system: ExtendedActorSystem)

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int
    Definition Classes
    AnyRef → Any
  3. def +(other: String): String
    Implicit
    This member is added by an implicit conversion from Extension to any2stringadd[Extension] performed by method any2stringadd in scala.Predef.
    Definition Classes
    any2stringadd
  4. def ->[B](y: B): (Extension, B)
    Implicit
    This member is added by an implicit conversion from Extension to ArrowAssoc[Extension] performed by method ArrowAssoc in scala.Predef.
    Definition Classes
    ArrowAssoc
    Annotations
    @inline()
  5. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  6. val DSLDefaultTimeout: FiniteDuration
  7. val DSLInboxQueueSize: Int
    Definition Classes
    InboxExtension
  8. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  9. def clone(): AnyRef
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @native() @HotSpotIntrinsicCandidate() @throws( ... )
  10. lazy val config: Config
  11. def ensuring(cond: (Extension) ⇒ Boolean, msg: ⇒ Any): Extension
    Implicit
    This member is added by an implicit conversion from Extension to Ensuring[Extension] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  12. def ensuring(cond: (Extension) ⇒ Boolean): Extension
    Implicit
    This member is added by an implicit conversion from Extension to Ensuring[Extension] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  13. def ensuring(cond: Boolean, msg: ⇒ Any): Extension
    Implicit
    This member is added by an implicit conversion from Extension to Ensuring[Extension] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  14. def ensuring(cond: Boolean): Extension
    Implicit
    This member is added by an implicit conversion from Extension to Ensuring[Extension] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  15. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  16. def equals(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  17. def formatted(fmtstr: String): String
    Implicit
    This member is added by an implicit conversion from Extension to StringFormat[Extension] performed by method StringFormat in scala.Predef.
    Definition Classes
    StringFormat
    Annotations
    @inline()
  18. final def getClass(): Class[_]
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  19. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  20. val inboxNr: AtomicInteger
    Definition Classes
    InboxExtension
  21. val inboxProps: Props
    Definition Classes
    InboxExtension
  22. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  23. def mkChild(p: Props, name: String): ActorRef
  24. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  25. def newReceiver: ActorRef
    Definition Classes
    InboxExtension
  26. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  27. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  28. final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
    AnyRef
  29. val system: ExtendedActorSystem
  30. def toString(): String
    Definition Classes
    AnyRef → Any
  31. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  32. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @throws( ... )
  33. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  34. def [B](y: B): (Extension, B)
    Implicit
    This member is added by an implicit conversion from Extension to ArrowAssoc[Extension] performed by method ArrowAssoc in scala.Predef.
    Definition Classes
    ArrowAssoc

Deprecated Value Members

  1. def finalize(): Unit
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @Deprecated @deprecated @throws( classOf[java.lang.Throwable] )
    Deprecated

    (Since version ) see corresponding Javadoc for more information.

Inherited from ActorDSL.InboxExtension

Inherited from actor.Extension

Inherited from AnyRef

Inherited from Any

Inherited by implicit conversion any2stringadd from Extension to any2stringadd[Extension]

Inherited by implicit conversion StringFormat from Extension to StringFormat[Extension]

Inherited by implicit conversion Ensuring from Extension to Ensuring[Extension]

Inherited by implicit conversion ArrowAssoc from Extension to ArrowAssoc[Extension]

Ungrouped