Get channel by which this channel would reply (used by ActorRef.
Get channel by which this channel would reply (used by ActorRef.forward)
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.
Returns the uuid for the actor.
Returns the uuid for the actor.
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
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"
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)
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 '!!!'.
User overridable callback/setting.
User overridable callback/setting.
Defines the life-cycle for a supervised actor.
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.
whether sending was successful
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.
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.
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)
User overridable callback/setting.
User overridable callback/setting.
Defines the life-cycle for a supervised actor.
Atomically create (from actor class) and start an actor.
Atomically create (from actor class), start and link an actor.
Atomically create (from actor class), start, link and make an actor remote.
Atomically create (from actor class), start and make an actor remote.
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);
Java API.
Java API.
Sends the specified message to the channel, i.e. fire-and-forget semantics.
actor.tell(message);
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)
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.
use (actor ? msg).as[T]
instead
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.
return type is an illusion, use the more honest ? method
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.
Use tryReply(..)
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);
Use 'tell' instead
Sends the specified message to the channel, i.
Sends the specified message to the channel, i.e. fire-and-forget semantics.
actor.sendOneWay(message);
Use 'tell' instead
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);
Use 'tryTell' instead
Java API.
Java API.
Try to send the specified message to the channel, i.e. fire-and-forget semantics.
actor.sendOneWay(message);
Use 'tryTell' instead
This trait represents the Scala Actor API There are implicit conversions in ../actor/Implicits.scala from ActorRef -> ScalaActorRef and back