akka.actor

ScalaActorRef

trait ScalaActorRef extends ActorRefShared

This trait represents the Scala Actor API There are implicit conversions in ../actor/Implicits.scala from ActorRef -> ScalaActorRef and back

Self Type
ScalaActorRef with ActorRef
Linear Supertypes
ActorRefShared, AnyRef, Any
Known Subclasses
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. Hide All
  2. Show all
  1. ScalaActorRef
  2. ActorRefShared
  3. AnyRef
  4. Any
Visibility
  1. Public
  2. All

Abstract Value Members

  1. def id : String

    Identifier for actor, does not have to be a unique one.

    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.

    Attributes
    abstract
  2. def id_= (id: String): Unit

    Attributes
    abstract
  3. def uuid : Uuid

    Returns the uuid for the actor.

    Returns the uuid for the actor.

    Attributes
    abstract
    Definition Classes
    ActorRefShared

Concrete Value Members

  1. def ! (message: Any)(implicit sender: Option[ActorRef] = None): 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
    

  2. def !! (message: Any, timeout: Long = this.timeout)(implicit sender: Option[ActorRef] = None): 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.

  3. def !!! [T] (message: Any, timeout: Long = this.timeout)(implicit sender: Option[ActorRef] = None): 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.

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

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

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

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

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

    Attributes
    final
    Definition Classes
    Any
  9. def asInstanceOf [T0] : T0

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

    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws()
  11. def eq (arg0: AnyRef): Boolean

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

    Definition Classes
    AnyRef → Any
  13. 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)
    

  14. def finalize (): Unit

    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws()
  15. def forward (message: Any)(implicit sender: Some[ActorRef]): Any

    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 '!!!'.

  16. def getClass (): java.lang.Class[_]

    Attributes
    final
    Definition Classes
    AnyRef
  17. def getFaultHandler (): FaultHandlingStrategy

  18. def getLifeCycle (): LifeCycle

  19. def hashCode (): Int

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

    Attributes
    final
    Definition Classes
    Any
  21. var lifeCycle : LifeCycle

    User overridable callback/setting.

    User overridable callback/setting.

    Defines the life-cycle for a supervised actor.

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

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

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

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

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

  29. 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)
    

  30. def setLifeCycle (arg0: LifeCycle): Unit

    User overridable callback/setting.

    User overridable callback/setting.

    Defines the life-cycle for a supervised actor.

  31. def spawn [T <: Actor] (implicit arg0: Manifest[T]): ActorRef

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

  32. def spawnLink [T <: Actor] (implicit arg0: Manifest[T]): ActorRef

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

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

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

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

    Attributes
    final
    Definition Classes
    AnyRef
  36. def toString (): String

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

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

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

    Attributes
    final
    Definition Classes
    AnyRef
    Annotations
    @throws()

Inherited from ActorRefShared

Inherited from AnyRef

Inherited from Any