public interface ActorGateway extends Serializable
Modifier and Type | Method and Description |
---|---|
akka.actor.ActorRef |
actor()
Returns the underlying actor with which is communicated
|
scala.concurrent.Future<Object> |
ask(Object message,
scala.concurrent.duration.FiniteDuration timeout)
Sends a message asynchronously and returns its response.
|
void |
forward(Object message,
ActorGateway sender)
Forwards a message.
|
UUID |
leaderSessionID()
Returns the leaderSessionID associated with the remote actor or null.
|
String |
path()
Returns the path of the remote instance.
|
scala.concurrent.Future<Object> |
retry(Object message,
int numberRetries,
scala.concurrent.duration.FiniteDuration timeout,
scala.concurrent.ExecutionContext executionContext)
Retries to send asynchronously a message up to numberRetries times.
|
void |
tell(Object message)
Sends a message asynchronously without a result.
|
void |
tell(Object message,
ActorGateway sender)
Sends a message asynchronously without a result with sender being the sender.
|
scala.concurrent.Future<Object> ask(Object message, scala.concurrent.duration.FiniteDuration timeout)
message
- Message to be senttimeout
- Timeout until the Future is completed with an AskTimeoutExceptionvoid tell(Object message)
message
- Message to be sentvoid tell(Object message, ActorGateway sender)
message
- Message to be sentsender
- Sender of the messagevoid forward(Object message, ActorGateway sender)
message
- Message to be sentsender
- Sender of the forwarded messagescala.concurrent.Future<Object> retry(Object message, int numberRetries, scala.concurrent.duration.FiniteDuration timeout, scala.concurrent.ExecutionContext executionContext)
message
- Message to be sentnumberRetries
- Number of times to retry sending the messagetimeout
- Timeout for each sending attemptexecutionContext
- ExecutionContext which is used to send the message multiple timesString path()
akka.actor.ActorRef actor()
UUID leaderSessionID()
Copyright © 2014–2020 The Apache Software Foundation. All rights reserved.