akka.actor

TypedActorContext

class TypedActorContext extends AnyRef

Holds RTTI (runtime type information) for the TypedActor, f.e. current 'sender' reference, the 'senderFuture' reference etc.

This class does not contain static information but is updated by the runtime system at runtime.

You can get a hold of the context using either the 'getContext()' or 'context' methods from the 'TypedActor' base class.

Here is an example of usage (from Java):

class PingImpl extends TypedActor implements Ping {
  public void hit(int count) {
    Pong pong = (Pong) context().sender();
    pong.hit(count++);
  }
}

Here is an example of usage (in Scala):

class PingImpl extends TypedActor with Ping {
  def hit(count: Int) = {
    val pong = context.sender.asInstanceOf[Pong]
    pong.hit(count += 1)
  }
}

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

Instance Constructors

  1. new TypedActorContext (actorRef: ActorRef)

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. def asInstanceOf [T0] : T0

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

    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws()
  8. def dispatcher : MessageDispatcher

  9. def eq (arg0: AnyRef): Boolean

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

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

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

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

  14. def getSelfAs [T <: AnyRef] (): T

  15. def hashCode (): Int

    Definition Classes
    AnyRef → Any
  16. def homeAddress : InetSocketAddress

    Returns the home address and port for this actor.

  17. def id : String

  18. def isBeingRestarted : Boolean

  19. def isInstanceOf [T0] : Boolean

    Attributes
    final
    Definition Classes
    Any
  20. def isRunning : Boolean

  21. def isShutdown : Boolean

  22. def isUnstarted : Boolean

  23. def lifeCycle : LifeCycle

  24. def mailboxSize : Int

  25. def ne (arg0: AnyRef): Boolean

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

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

    Attributes
    final
    Definition Classes
    AnyRef
  28. def receiveTimeout : Option[Long]

  29. def sender : AnyRef

    Returns the current sender reference.

    Returns the current sender reference. Scala style getter.

  30. def senderFuture : Option[CompletableFuture[Any]]

    Returns the current sender future TypedActor reference.

    Returns the current sender future TypedActor reference. Scala style getter.

  31. def setId (id: String): Unit

  32. def setReceiveTimeout (timeout: Long): Unit

  33. def setTimout (timeout: Long): Unit

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

    Attributes
    final
    Definition Classes
    AnyRef
  35. def timeout : Long

  36. def toString (): String

    Definition Classes
    AnyRef → Any
  37. def uuid : Uuid

    5 * Returns the uuid for the actor.

  38. def wait (): Unit

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

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

    Attributes
    final
    Definition Classes
    AnyRef
    Annotations
    @throws()

Deprecated Value Members

  1. def getId : String

    Deprecated

    use 'id()'

  2. def getReceiveTimeout : Option[Long]

    Deprecated

    use 'receiveTimeout()'

  3. def getSender : AnyRef

    Returns the current sender reference.

    Returns the current sender reference. Java style getter.

    Deprecated

    use 'sender()'

  4. def getSenderFuture : Option[CompletableFuture[Any]]

    Returns the current sender future TypedActor reference.

    Returns the current sender future TypedActor reference. Java style getter. This method returns 'null' if the sender future is not available.

    Deprecated

    use 'senderFuture()'

  5. def getTimout : Long

    Deprecated

    use 'timeout()'

  6. def getUuid (): Uuid

    Returns the uuid for the actor.

    Returns the uuid for the actor.

    Deprecated

    use 'uuid()'

Inherited from AnyRef

Inherited from Any