akka.testkit

TestActorRef

class TestActorRef [T <: Actor] extends LocalActorRef

This special ActorRef is exclusively for use during unit testing in a single-threaded environment. Therefore, it overrides the dispatcher to CallingThreadDispatcher and sets the receiveTimeout to None. Otherwise, it acts just like a normal ActorRef. You may retrieve a reference to the underlying actor to test internal logic.

Since

1.1

Linear Supertypes
Known Subclasses
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. Hide All
  2. Show all
  1. TestActorRef
  2. LocalActorRef
  3. ScalaActorRef
  4. ActorRef
  5. Comparable
  6. ReplyChannel
  7. ForwardableChannel
  8. AvailableChannel
  9. UntypedChannel
  10. Channel
  11. Channel
  12. ActorRefShared
  13. AnyRef
  14. Any
Visibility
  1. Public
  2. All

Instance Constructors

  1. new TestActorRef (factory: () ⇒ T)

Value Members

  1. def ! (message: Any)(implicit channel: UntypedChannel = NullChannel): Unit

    Sends a one-way asynchronous message.

    Sends a one-way asynchronous message. E.g. fire-and-forget semantics.

    If invoked from within an actor then the actor reference is implicitly passed on as the implicit 'sender' argument.

    This actor 'sender' reference is then available in the receiving actor in the 'sender' member variable, if invoked from within an Actor. If not then no sender is available.

      actor ! message
    

    Definition Classes
    ScalaActorRefChannel
  2. def != (arg0: AnyRef): Boolean

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

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

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

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

    Attributes
    final
    Definition Classes
    Any
  7. def ? (message: Any)(implicit channel: UntypedChannel = NullChannel, timeout: Timeout = Actor.defaultTimeout): ActorCompletableFuture

    Sends a message asynchronously, returning a future which may eventually hold the reply.

    Sends a message asynchronously, returning a future which may eventually hold the reply. Is pronounced: "ask"

    Definition Classes
    ScalaActorRef
  8. var _futureTimeout : Option[ScheduledFuture[AnyRef]]

    Attributes
    protected[akka]
    Definition Classes
    LocalActorRef
  9. var _status : StatusType

    Attributes
    protected[this]
    Definition Classes
    ActorRef
  10. var _uuid : Uuid

    Attributes
    protected[akka]
    Definition Classes
    ActorRef
  11. def actor : Actor

    Attributes
    protected[akka]
    Definition Classes
    ActorRef
  12. val actorInstance : AtomicReference[Actor]

    Attributes
    protected[akka]
    Definition Classes
    LocalActorRefActorRef
  13. def apply (o: Any): Unit

    Directly inject messages into actor receive behavior.

    Directly inject messages into actor receive behavior. Any exceptions thrown will be available to you, while still being able to use become/unbecome and their message counterparts.

  14. def asInstanceOf [T0] : T0

    Attributes
    final
    Definition Classes
    Any
  15. def ask (message: AnyRef, timeout: Long, sender: ActorRef): Future[Any]

    Akka Java API.

    Akka Java API.

    Sends a message asynchronously returns a future holding the eventual reply message.

    NOTE: Use this method with care. In most cases it is better to use 'tell' together with the 'getContext().getSender()' to implement request/response message exchanges.

    If you are sending messages using ask then you have to use getContext().reply(..) to send a reply message to the original sender. If not then the sender will block until the timeout expires.

    Definition Classes
    ActorRef
  16. def ask (message: AnyRef, sender: ActorRef): Future[Any]

    Akka Java API.

    Akka Java API.

    Definition Classes
    ActorRef
    See also

    ask(message: AnyRef, sender: ActorRef): Future[_] Uses the Actors default timeout (setTimeout())

  17. def ask (message: AnyRef, timeout: Long): Future[Any]

    Akka Java API.

    Akka Java API.

    Definition Classes
    ActorRef
    See also

    ask(message: AnyRef, sender: ActorRef): Future[_] Uses the specified timeout (milliseconds)

  18. def ask (message: AnyRef): Future[Any]

    Akka Java API.

    Akka Java API.

    Definition Classes
    ActorRef
    See also

    ask(message: AnyRef, sender: ActorRef): Future[_] Uses the Actors default timeout (setTimeout()) and omits the sender

  19. def cancelReceiveTimeout : Unit

    Attributes
    protected[akka]
    Definition Classes
    LocalActorRef
  20. def channel : UntypedChannel

    Abstraction for unification of sender and senderFuture for later reply

    Abstraction for unification of sender and senderFuture for later reply

    Definition Classes
    ActorRefForwardableChannel
  21. def checkReceiveTimeout (): Unit

    Attributes
    protected[akka]
    Definition Classes
    LocalActorRef
  22. val clientManaged : Boolean

    Definition Classes
    LocalActorRef
  23. def clone (): AnyRef

    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws()
  24. def compareTo (other: ActorRef): Int

    Comparison only takes uuid into account.

    Comparison only takes uuid into account.

    Definition Classes
    ActorRef → Comparable
  25. var currentMessage : MessageInvocation

    This is a reference to the message currently being processed by the actor

    This is a reference to the message currently being processed by the actor

    Attributes
    protected[akka]
    Definition Classes
    ActorRef
  26. def dispatcher : MessageDispatcher

    Get the dispatcher for this actor.

    Get the dispatcher for this actor.

    Definition Classes
    LocalActorRefActorRef
  27. def dispatcher_= (md: MessageDispatcher): Unit

    Sets the dispatcher for this actor.

    Sets the dispatcher for this actor. Needs to be invoked before the actor is started.

    Definition Classes
    LocalActorRefActorRef
  28. def eq (arg0: AnyRef): Boolean

    Attributes
    final
    Definition Classes
    AnyRef
  29. def equals (other: Any): Boolean

    Definition Classes
    TestActorRefActorRef → AnyRef → Any
  30. def exit (): Unit

    Shuts down the actor its dispatcher and message queue.

    Shuts down the actor its dispatcher and message queue. Alias for 'stop'.

    Definition Classes
    ActorRef
  31. var faultHandler : FaultHandlingStrategy

    User overridable callback/setting.

    User overridable callback/setting.

    Don't forget to supply a List of exception types to intercept (trapExit)

    Can be one of:

     faultHandler = AllForOneStrategy(trapExit = List(classOf[Exception]), maxNrOfRetries, withinTimeRange)
    
    Or:
     faultHandler = OneForOneStrategy(trapExit = List(classOf[Exception]), maxNrOfRetries, withinTimeRange)
    

    Definition Classes
    ScalaActorRef
  32. def finalize (): Unit

    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws()
  33. def forward (message: Any)(implicit channel: ForwardableChannel): Unit

    Forwards the message and passes the original sender actor as the sender.

    Forwards the message and passes the original sender actor as the sender.

    Works with '!', '!!' and '!!!'.

    Definition Classes
    ScalaActorRef
  34. def forward (message: AnyRef, sender: ActorRef): Unit

    Akka Java API.

    Akka Java API.

    Forwards the message specified to this actor and preserves the original sender of the message

    Definition Classes
    ActorRef
  35. def getChannel : UntypedChannel

    Java API.

    Java API.

    Abstraction for unification of sender and senderFuture for later reply

    Definition Classes
    ActorRef
  36. def getClass (): java.lang.Class[_]

    Attributes
    final
    Definition Classes
    AnyRef → Any
  37. def getDispatcher (): MessageDispatcher

    Definition Classes
    ActorRef
  38. def getFaultHandler (): FaultHandlingStrategy

    Definition Classes
    ScalaActorRef
  39. def getId (): String

    Definition Classes
    ActorRef
  40. def getLifeCycle (): LifeCycle

    Definition Classes
    ScalaActorRef
  41. def getLinkedActors (): Map[Uuid, ActorRef]

    Java API.

    Java API.

    Returns an unmodifiable Java Map containing the linked actors, please note that the backing map is thread-safe but not immutable

    Definition Classes
    ActorRef
  42. def getReceiveTimeout (): Option[Long]

    Definition Classes
    ActorRef
  43. def getSender (): Option[ActorRef]

    Akka Java API.

    Akka Java API.

    The reference sender Actor of the last received message. Is defined if the message was sent from another Actor, else None.

    Definition Classes
    ActorRef
  44. def getSenderFuture (): Option[CompletableFuture[Any]]

    Akka Java API.

    Akka Java API.

    The reference sender future of the last received message. Is defined if the message was sent with sent with '!!' or '!!!', else None.

    Definition Classes
    ActorRef
  45. def getSupervisor (): ActorRef

    Akka Java API.

    Akka Java API.

    Returns the supervisor, if there is one.

    Definition Classes
    ActorRef
  46. def getUuid (): Uuid

    Returns the uuid for the actor.

    Returns the uuid for the actor.

    Definition Classes
    ActorRef
  47. val guard : ReentrantGuard

    Attributes
    protected[akka]
    Definition Classes
    LocalActorRef
  48. def handleTrapExit (dead: ActorRef, reason: Throwable): Unit

    Attributes
    protected[akka]
    Definition Classes
    LocalActorRefActorRef
  49. def hashCode (): Int

    Definition Classes
    ActorRef → AnyRef → Any
  50. val homeAddress : Option[InetSocketAddress]

    Returns on which node this actor lives if None it lives in the local ActorRegistry

    Returns on which node this actor lives if None it lives in the local ActorRegistry

    Definition Classes
    LocalActorRefActorRef
  51. var hotswap : Stack[PartialFunction[Any, Unit]]

    Holds the hot swapped partial function.

    Holds the hot swapped partial function.

    Attributes
    protected[akka]
    Definition Classes
    ActorRef
  52. var id : String

    User overridable callback/setting.

    User overridable callback/setting.

    Identifier for actor, does not have to be a unique one. Default is the 'uuid'.

    This field is used for logging, AspectRegistry.actorsFor(id), identifier for remote actor in RemoteServer etc.But also as the identifier for persistence, which means that you can use a custom name to be able to retrieve the "correct" persisted state upon restart, remote restart etc.

    Definition Classes
    ActorRef
  53. def invoke (messageHandle: MessageInvocation): Unit

    Callback for the dispatcher.

    Callback for the dispatcher. This is the single entry point to the user Actor implementation.

    Attributes
    protected[akka]
    Definition Classes
    LocalActorRefActorRef
  54. def isBeingRestarted : Boolean

    Is the actor being restarted?

    Is the actor being restarted?

    Definition Classes
    ActorRef
  55. def isDefinedAt (o: Any): Boolean

    Query actor's current receive behavior.

    Query actor's current receive behavior.

    Definition Classes
    TestActorRefActorRef
  56. def isInstanceOf [T0] : Boolean

    Attributes
    final
    Definition Classes
    Any
  57. def isRunning : Boolean

    Is the actor running?

    Is the actor running?

    Definition Classes
    ActorRef
  58. def isShutdown : Boolean

    Is the actor shut down?

    Is the actor shut down?

    Definition Classes
    ActorRef
  59. def isUnstarted : Boolean

    Is the actor ever started?

    Is the actor ever started?

    Definition Classes
    ActorRef
  60. var lifeCycle : LifeCycle

    User overridable callback/setting.

    User overridable callback/setting.

    Defines the life-cycle for a supervised actor.

    Definition Classes
    ScalaActorRef
  61. def link (actorRef: ActorRef): Unit

    Links an other actor to this actor.

    Links an other actor to this actor. Links are unidirectional and means that a the linking actor will receive a notification if the linked actor has crashed.

    If the 'trapExit' member field of the 'faultHandler' has been set to at contain at least one exception class then it will 'trap' these exceptions and automatically restart the linked actors according to the restart strategy defined by the 'faultHandler'.

    To be invoked from within the actor itself.

    Definition Classes
    LocalActorRefActorRef
  62. def linkedActors : Map[Uuid, ActorRef]

    Returns an unmodifiable Java Map containing the linked actors, please note that the backing map is thread-safe but not immutable

    Returns an unmodifiable Java Map containing the linked actors, please note that the backing map is thread-safe but not immutable

    Definition Classes
    LocalActorRefActorRef
  63. def mailbox : AnyRef

    Returns the mailbox.

    Returns the mailbox.

    Definition Classes
    LocalActorRefActorRef
  64. def mailbox_= (value: AnyRef): AnyRef

    Attributes
    protected[akka]
    Definition Classes
    LocalActorRefActorRef
  65. def ne (arg0: AnyRef): Boolean

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

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

    Attributes
    final
    Definition Classes
    AnyRef
  68. def postMessageToMailbox (message: Any, channel: UntypedChannel): Unit

    Attributes
    protected[akka]
    Definition Classes
    LocalActorRefActorRef
  69. def postMessageToMailboxAndCreateFutureResultWithTimeout (message: Any, timeout: Long, channel: UntypedChannel): ActorCompletableFuture

    Attributes
    protected[akka]
    Definition Classes
    LocalActorRefActorRef
  70. var receiveTimeout : Option[Long]

    User overridable callback/setting.

    User overridable callback/setting.

    Defines the default timeout for an initial receive invocation. When specified, the receive function should be able to handle a 'ReceiveTimeout' message.

    Definition Classes
    ActorRef
  71. def registerSupervisorAsRemoteActor : Option[Uuid]

    Attributes
    protected[akka]
    Definition Classes
    LocalActorRefActorRef
  72. def reply (message: Any): Unit

    Use self.reply(..) to reply with a message to the original sender of the message currently being processed.

    Use self.reply(..) to reply with a message to the original sender of the message currently being processed. This method fails if the original sender of the message could not be determined with an IllegalStateException.

    If you don't want deal with this IllegalStateException, but just a boolean, just use the tryReply(...) version.

    Throws an IllegalStateException if unable to determine what to reply to.

    Definition Classes
    ActorRef
  73. def restart (reason: Throwable, maxNrOfRetries: Option[Int], withinTimeRange: Option[Int]): Unit

    Attributes
    protected[akka]
    Definition Classes
    LocalActorRefActorRef
  74. def restartLinkedActors (reason: Throwable, maxNrOfRetries: Option[Int], withinTimeRange: Option[Int]): Unit

    Attributes
    protected[akka]
    Definition Classes
    LocalActorRefActorRef
  75. def sendException (ex: Throwable): Boolean

    Try to send an exception.

    Try to send an exception. Not all channel types support this, one notable positive example is Future. Failure to send is silent.

    returns

    whether sending was successful

    Definition Classes
    Channel
  76. def sender : Option[ActorRef]

    The reference sender Actor of the last received message.

    The reference sender Actor of the last received message. Is defined if the message was sent from another Actor, else None.

    Definition Classes
    ScalaActorRef
  77. def senderFuture (): Option[CompletableFuture[Any]]

    The reference sender future of the last received message.

    The reference sender future of the last received message. Is defined if the message was sent with sent with '!!' or '!!!', else None.

    Definition Classes
    ScalaActorRef
  78. def setDispatcher (dispatcher: MessageDispatcher): Unit

    Akka Java API.

    Akka Java API.

    The default dispatcher is the Dispatchers.globalExecutorBasedEventDrivenDispatcher. This means that all actors will share the same event-driven executor based dispatcher.

    You can override it so it fits the specific use-case that the actor is used for. See the akka.dispatch.Dispatchers class for the different dispatchers available.

    The default is also that all actors that are created and spawned from within this actor is sharing the same dispatcher as its creator.

    Definition Classes
    ActorRef
  79. def setFaultHandler (arg0: FaultHandlingStrategy): Unit

    User overridable callback/setting.

    User overridable callback/setting.

    Don't forget to supply a List of exception types to intercept (trapExit)

    Can be one of:

     faultHandler = AllForOneStrategy(trapExit = List(classOf[Exception]), maxNrOfRetries, withinTimeRange)
    
    Or:
     faultHandler = OneForOneStrategy(trapExit = List(classOf[Exception]), maxNrOfRetries, withinTimeRange)
    

    Definition Classes
    ScalaActorRef
  80. def setId (arg0: String): Unit

    User overridable callback/setting.

    User overridable callback/setting.

    Identifier for actor, does not have to be a unique one. Default is the 'uuid'.

    This field is used for logging, AspectRegistry.actorsFor(id), identifier for remote actor in RemoteServer etc.But also as the identifier for persistence, which means that you can use a custom name to be able to retrieve the "correct" persisted state upon restart, remote restart etc.

    Definition Classes
    ActorRef
  81. def setLifeCycle (arg0: LifeCycle): Unit

    User overridable callback/setting.

    User overridable callback/setting.

    Defines the life-cycle for a supervised actor.

    Definition Classes
    ScalaActorRef
  82. def setReceiveTimeout (timeout: Long): Unit

    Akka Java API.

    Akka Java API.

    Defines the default timeout for an initial receive invocation. When specified, the receive function should be able to handle a 'ReceiveTimeout' message.

    Definition Classes
    ActorRef
  83. def spawn (clazz: Class[_ <: akka.actor.Actor]): ActorRef

    Atomically create (from actor class) and start an actor.

    Atomically create (from actor class) and start an actor.

    To be invoked from within the actor itself.

    Definition Classes
    LocalActorRefActorRef
  84. def spawn [T <: Actor] (implicit arg0: Manifest[T]): ActorRef

    Atomically create (from actor class) and start an actor.

    Atomically create (from actor class) and start an actor.

    Definition Classes
    ScalaActorRef
  85. def spawnLink (clazz: Class[_ <: akka.actor.Actor]): ActorRef

    Atomically create (from actor class), start and link an actor.

    Atomically create (from actor class), start and link an actor.

    To be invoked from within the actor itself.

    Definition Classes
    LocalActorRefActorRef
  86. def spawnLink [T <: Actor] (implicit arg0: Manifest[T]): ActorRef

    Atomically create (from actor class), start and link an actor.

    Atomically create (from actor class), start and link an actor.

    Definition Classes
    ScalaActorRef
  87. def spawnLinkRemote (clazz: Class[_ <: akka.actor.Actor], hostname: String, port: Int, timeout: Long = Actor.TIMEOUT): ActorRef

    Atomically create (from actor class), start, link and make an actor remote.

    Atomically create (from actor class), start, link and make an actor remote.

    To be invoked from within the actor itself.

    Definition Classes
    LocalActorRefActorRef
  88. def spawnLinkRemote [T <: Actor] (hostname: String, port: Int, timeout: Long)(implicit arg0: Manifest[T]): ActorRef

    Atomically create (from actor class), start, link and make an actor remote.

    Atomically create (from actor class), start, link and make an actor remote.

    Definition Classes
    ScalaActorRef
  89. def spawnRemote (clazz: Class[_ <: akka.actor.Actor], hostname: String, port: Int, timeout: Long = Actor.TIMEOUT): ActorRef

    Atomically create (from actor class), start and make an actor remote.

    Atomically create (from actor class), start and make an actor remote.

    To be invoked from within the actor itself.

    Definition Classes
    LocalActorRefActorRef
  90. def spawnRemote [T <: Actor] (hostname: String, port: Int, timeout: Long)(implicit arg0: Manifest[T]): ActorRef

    Atomically create (from actor class), start and make an actor remote.

    Atomically create (from actor class), start and make an actor remote.

    Definition Classes
    ScalaActorRef
  91. def start (): TestActorRef.this.type

    Starts up the actor and its message queue.

    Starts up the actor and its message queue.

    Definition Classes
    LocalActorRefActorRef
  92. def startLink (actorRef: ActorRef): Unit

    Atomically start and link an actor.

    Atomically start and link an actor.

    To be invoked from within the actor itself.

    Definition Classes
    LocalActorRefActorRef
  93. def stop (): Unit

    Shuts down the actor its dispatcher and message queue.

    Shuts down the actor its dispatcher and message queue.

    Definition Classes
    LocalActorRefActorRef
  94. def supervisor : Option[ActorRef]

    Returns the supervisor, if there is one.

    Returns the supervisor, if there is one.

    Definition Classes
    LocalActorRefActorRef
  95. def supervisor_= (a: Option[ActorRef]): Unit

    Override to check whether the new supervisor is running on the CallingThreadDispatcher, as it should be.

    Override to check whether the new supervisor is running on the CallingThreadDispatcher, as it should be. This can of course be tricked by linking before setting the dispatcher before starting the supervisor, but then you just asked for trouble.

    Definition Classes
    TestActorRefLocalActorRefActorRef
  96. def synchronized [T0] (arg0: ⇒ T0): T0

    Attributes
    final
    Definition Classes
    AnyRef
  97. def tell (msg: Any, sender: UntypedChannel): Unit

    Java API.

    Java API.

    Sends the specified message to the channel, i.e. fire-and-forget semantics, including the sender reference if possible (not supported on all channels).

    actor.tell(message, context);
    

    Definition Classes
    Channel
  98. def tell (msg: Any): Unit

    Java API.

    Java API.

    Sends the specified message to the channel, i.e. fire-and-forget semantics.

    actor.tell(message);
    

    Definition Classes
    Channel
  99. def toString (): String

    Definition Classes
    TestActorRefActorRef → AnyRef → Any
  100. def tryReply (message: Any): Boolean

    Use getContext().tryReply(..) to reply with a message to the original sender of the message currently being processed.

    Use getContext().tryReply(..) to reply with a message to the original sender of the message currently being processed.

    Returns true if reply was sent, and false if unable to determine what to reply to.

    Definition Classes
    ActorRef
  101. def tryTell (msg: Any)(implicit sender: UntypedChannel): Boolean

    Scala and Java API.

    Scala and Java API.

    Try to send the specified message to the channel, i.e. fire-and-forget semantics, including the sender reference if possible (not supported on all channels).

    From Java:

    actor.tryTell(message);
    actor.tryTell(message, context);
    

    From Scala:

    actor tryTell message
    actor.tryTell(message)(sender)
    

    Definition Classes
    Channel
  102. def underlyingActor : T

    Retrieve reference to the underlying actor, where the static type matches the factory used inside the constructor.

    Retrieve reference to the underlying actor, where the static type matches the factory used inside the constructor. Beware that this reference is discarded by the ActorRef upon restarting the actor (should this reference be linked to a supervisor). The old Actor may of course still be used in post-mortem assertions.

  103. def unlink (actorRef: ActorRef): Unit

    Unlink the actor.

    Unlink the actor.

    To be invoked from within the actor itself.

    Definition Classes
    LocalActorRefActorRef
  104. def uuid : Uuid

    Returns the uuid for the actor.

    Returns the uuid for the actor.

    Definition Classes
    ActorRefActorRefShared
  105. def uuid_= (uid: Uuid): Unit

    Only for internal use.

    Only for internal use. UUID is effectively final.

    Attributes
    protected[akka]
    Definition Classes
    ActorRef
  106. def wait (): Unit

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

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

    Attributes
    final
    Definition Classes
    AnyRef
    Annotations
    @throws()

Deprecated Value Members

  1. def !! (message: Any, timeout: Long = this.timeout)(implicit channel: UntypedChannel = NullChannel): Option[Any]

    Sends a message asynchronously and waits on a future for a reply message.

    Sends a message asynchronously and waits on a future for a reply message.

    It waits on the reply either until it receives it (in the form of Some(replyMessage)) or until the timeout expires (which will return None). E.g. send-and-receive-eventually semantics.

    NOTE: Use this method with care. In most cases it is better to use '!' together with the 'sender' member field to implement request/response message exchanges. If you are sending messages using !! then you have to use self.reply(..) to send a reply message to the original sender. If not then the sender will block until the timeout expires.

    Definition Classes
    ScalaActorRef
    Annotations
    @deprecated
    Deprecated

    use (actor ? msg).as[T] instead

  2. def !!! [T] (message: Any, timeout: Long = this.timeout)(implicit channel: UntypedChannel = NullChannel): Future[T]

    Sends a message asynchronously returns a future holding the eventual reply message.

    Sends a message asynchronously returns a future holding the eventual reply message.

    NOTE: Use this method with care. In most cases it is better to use '!' together with the 'sender' member field to implement request/response message exchanges. If you are sending messages using !!! then you have to use self.reply(..) to send a reply message to the original sender. If not then the sender will block until the timeout expires.

    Definition Classes
    ScalaActorRef
    Annotations
    @deprecated
    Deprecated

    return type is an illusion, use the more honest ? method

  3. def actorClass : Class[_ <: akka.actor.Actor]

    Returns the class for the Actor instance that is managed by the ActorRef.

    Returns the class for the Actor instance that is managed by the ActorRef.

    Definition Classes
    LocalActorRefActorRef
    Annotations
    @deprecated
    Deprecated

    Will be removed without replacement, doesn't make any sense to have in the face of become and unbecome

  4. def actorClassName : String

    Returns the class name for the Actor instance that is managed by the ActorRef.

    Returns the class name for the Actor instance that is managed by the ActorRef.

    Definition Classes
    LocalActorRefActorRef
    Annotations
    @deprecated
    Deprecated

    Will be removed without replacement, doesn't make any sense to have in the face of become and unbecome

  5. def getActorClass (): Class[_ <: akka.actor.Actor]

    Akka Java API.

    Akka Java API.

    Returns the class for the Actor instance that is managed by the ActorRef.

    Definition Classes
    ActorRef
    Annotations
    @deprecated
    Deprecated

    Will be removed without replacement, doesn't make any sense to have in the face of become and unbecome

  6. def getActorClassName (): String

    Akka Java API.

    Akka Java API.

    Returns the class name for the Actor instance that is managed by the ActorRef.

    Definition Classes
    ActorRef
    Annotations
    @deprecated
    Deprecated

    Will be removed without replacement, doesn't make any sense to have in the face of become and unbecome

  7. def getHomeAddress (): InetSocketAddress

    Java API.

    Java API.

    Definition Classes
    ActorRef
    Annotations
    @deprecated
    Deprecated

    Remoting will become fully transparent in the future

  8. def getMailboxSize (): Int

    Akka Java API.

    Akka Java API.

    Returns the mailbox size.

    Definition Classes
    ActorRef
    Annotations
    @deprecated
    Deprecated

    Use actorref.dispatcher.mailboxSize(actorref)

  9. def getTimeout (): Long

    Definition Classes
    ActorRef
    Annotations
    @deprecated
    Deprecated

    Will be replaced by implicit-scoped timeout on all methods that needs it, will default to timeout specified in config

  10. def mailboxSize : Int

    Returns the mailbox size.

    Returns the mailbox size.

    Definition Classes
    ActorRef
    Annotations
    @deprecated
    Deprecated

    Use actorref.dispatcher.mailboxSize(actorref)

  11. def replySafe (message: AnyRef): Boolean

    Akka Java API.

    Akka Java API.

    Use getContext().replySafe(..) to reply with a message to the original sender of the message currently being processed.

    Returns true if reply was sent, and false if unable to determine what to reply to.

    Definition Classes
    ActorRef
    Annotations
    @deprecated
    Deprecated

    replaced by tryReply

  12. def replyUnsafe (message: AnyRef): Unit

    Akka Java API.

    Akka Java API.

    Use getContext().replyUnsafe(..) to reply with a message to the original sender of the message currently being processed.

    Throws an IllegalStateException if unable to determine what to reply to.

    Definition Classes
    ActorRef
    Annotations
    @deprecated
    Deprecated

    replaced by reply

  13. def reply_? (message: Any): Boolean

    Use reply_?(..) to reply with a message to the original sender of the message currently being processed.

    Use reply_?(..) to reply with a message to the original sender of the message currently being processed.

    Returns true if reply was sent, and false if unable to determine what to reply to.

    Definition Classes
    ScalaActorRef
    Annotations
    @deprecated
    Deprecated

    Use tryReply(..)

  14. def sendOneWay (msg: Any, sender: UntypedChannel): Unit

    Java API.

    Java API.

    Sends the specified message to the channel, i.e. fire-and-forget semantics, including the sender reference if possible (not supported on all channels).

    actor.sendOneWay(message, context);
    

    Definition Classes
    Channel
    Annotations
    @deprecated
    Deprecated

    Use 'tell' instead

  15. def sendOneWay (msg: Any): Unit

    Sends the specified message to the channel, i.

    Sends the specified message to the channel, i.e. fire-and-forget semantics.

    actor.sendOneWay(message);
    

    Definition Classes
    Channel
    Annotations
    @deprecated
    Deprecated

    Use 'tell' instead

  16. def sendOneWaySafe (msg: Any, sender: UntypedChannel): Boolean

    Java API.

    Java API.

    Try to send the specified message to the channel, i.e. fire-and-forget semantics, including the sender reference if possible (not supported on all channels).

    actor.sendOneWay(message, context);
    

    Definition Classes
    Channel
    Annotations
    @deprecated
    Deprecated

    Use 'tryTell' instead

  17. def sendOneWaySafe (msg: Any): Boolean

    Java API.

    Java API.

    Try to send the specified message to the channel, i.e. fire-and-forget semantics.

    actor.sendOneWay(message);
    

    Definition Classes
    Channel
    Annotations
    @deprecated
    Deprecated

    Use 'tryTell' instead

  18. def sendRequestReply (message: AnyRef, timeout: Long, sender: ActorRef): AnyRef

    Akka Java API.

    Akka Java API.

    Sends a message asynchronously and waits on a future for a reply message under the hood.

    It waits on the reply either until it receives it or until the timeout expires (which will throw an ActorTimeoutException). E.g. send-and-receive-eventually semantics.

    NOTE: Use this method with care. In most cases it is better to use 'tell' together with 'getContext().getSender()' to implement request/response message exchanges.

    If you are sending messages using sendRequestReply then you have to use getContext().reply(..) to send a reply message to the original sender. If not then the sender will block until the timeout expires.

    Definition Classes
    ActorRef
    Annotations
    @deprecated
    Deprecated

    Will be removed in 2.0, use 'ask().get()' for blocking calls

  19. def sendRequestReply (message: AnyRef, sender: ActorRef): AnyRef

    Akka Java API.

    Akka Java API.

    Definition Classes
    ActorRef
    Annotations
    @deprecated
    Deprecated

    Will be removed in 2.0, use 'ask().get()' for blocking calls

    See also

    sendRequestReply(message: AnyRef, timeout: Long, sender: ActorRef) Uses the default timeout of the Actor (setTimeout())

  20. def sendRequestReply (message: AnyRef): AnyRef

    Akka Java API.

    Akka Java API.

    Definition Classes
    ActorRef
    Annotations
    @deprecated
    Deprecated

    Will be removed in 2.0, use 'ask().get()' for blocking calls

    See also

    sendRequestReply(message: AnyRef, timeout: Long, sender: ActorRef) Uses the default timeout of the Actor (setTimeout()) and omits the sender reference

  21. def sendRequestReplyFuture (message: AnyRef, timeout: Long, sender: ActorRef): Future[Any]

    Akka Java API.

    Akka Java API.

    Sends a message asynchronously returns a future holding the eventual reply message.

    NOTE: Use this method with care. In most cases it is better to use 'tell' together with the 'getContext().getSender()' to implement request/response message exchanges.

    If you are sending messages using sendRequestReplyFuture then you have to use getContext().reply(..) to send a reply message to the original sender. If not then the sender will block until the timeout expires.

    Definition Classes
    ActorRef
    Annotations
    @deprecated
    Deprecated

    Use 'ask' instead, this method will be removed in the future

  22. def sendRequestReplyFuture (message: AnyRef, sender: ActorRef): Future[Any]

    Akka Java API.

    Akka Java API.

    Definition Classes
    ActorRef
    Annotations
    @deprecated
    Deprecated

    Use 'ask' instead, this method will be removed in the future

    See also

    sendRequestReplyFuture(message: AnyRef, sender: ActorRef): Future[_] Uses the Actors default timeout (setTimeout())

  23. def sendRequestReplyFuture (message: AnyRef): Future[Any]

    Akka Java API.

    Akka Java API.

    Definition Classes
    ActorRef
    Annotations
    @deprecated
    Deprecated

    Use 'ask' instead, this method will be removed in the future

    See also

    sendRequestReplyFuture(message: AnyRef, sender: ActorRef): Future[_] Uses the Actors default timeout (setTimeout()) and omits the sender

  24. def setTimeout (arg0: Long): Unit

    User overridable callback/setting.

    User overridable callback/setting.

    Defines the default timeout for '!!' and '!!!' invocations, e.g. the timeout for the future returned by the call to '!!' and '!!!'.

    Definition Classes
    ActorRef
    Annotations
    @deprecated
    Deprecated

    Will be replaced by implicit-scoped timeout on all methods that needs it, will default to timeout specified in config

  25. var timeout : Long

    User overridable callback/setting.

    User overridable callback/setting.

    Defines the default timeout for '!!' and '!!!' invocations, e.g. the timeout for the future returned by the call to '!!' and '!!!'.

    Definition Classes
    ActorRef
    Annotations
    @deprecated
    Deprecated

    Will be replaced by implicit-scoped timeout on all methods that needs it, will default to timeout specified in config

Inherited from LocalActorRef

Inherited from ScalaActorRef

Inherited from ActorRef

Inherited from Comparable[ActorRef]

Inherited from ReplyChannel[Any]

Inherited from ForwardableChannel

Inherited from AvailableChannel[Any]

Inherited from UntypedChannel

Inherited from Channel[Any]

Inherited from Channel[Any]

Inherited from ActorRefShared

Inherited from AnyRef

Inherited from Any