public class AkkaActorGateway extends Object implements ActorGateway, Serializable
ActorGateway
implementation which uses Akka to communicate with remote actors.构造器和说明 |
---|
AkkaActorGateway(akka.actor.ActorRef actor,
UUID leaderSessionID) |
限定符和类型 | 方法和说明 |
---|---|
akka.actor.ActorRef |
actor()
Returns
ActorRef of the target actor |
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 ActorPath 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.
|
String |
toString() |
public AkkaActorGateway(akka.actor.ActorRef actor, UUID leaderSessionID)
public scala.concurrent.Future<Object> ask(Object message, scala.concurrent.duration.FiniteDuration timeout)
ask
在接口中 ActorGateway
message
- Message to be senttimeout
- Timeout until the Future is completed with an AskTimeoutExceptionpublic void tell(Object message)
tell
在接口中 ActorGateway
message
- Message to be sentpublic void tell(Object message, ActorGateway sender)
tell
在接口中 ActorGateway
message
- Message to be sentsender
- Sender of the messagepublic void forward(Object message, ActorGateway sender)
forward
在接口中 ActorGateway
message
- Message to be sentsender
- Sender of the forwarded messagepublic scala.concurrent.Future<Object> retry(Object message, int numberRetries, scala.concurrent.duration.FiniteDuration timeout, scala.concurrent.ExecutionContext executionContext)
retry
在接口中 ActorGateway
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 timespublic String path()
path
在接口中 ActorGateway
public akka.actor.ActorRef actor()
ActorRef
of the target actoractor
在接口中 ActorGateway
public UUID leaderSessionID()
ActorGateway
leaderSessionID
在接口中 ActorGateway
Copyright © 2014–2019 The Apache Software Foundation. All rights reserved.