public abstract class RemoteTransport
extends java.lang.Object
The remote transport is responsible for sending and receiving messages. Each transport has an address, which it should provide in Serialization.currentTransportInformation (thread-local) while serializing actor references (which might also be part of messages). This address must be available (i.e. fully initialized) by the time the first message is received or when the start() method returns, whatever happens first.
Constructor and Description |
---|
RemoteTransport(ExtendedActorSystem system,
RemoteActorRefProvider provider) |
Modifier and Type | Method and Description |
---|---|
abstract scala.collection.immutable.Set<Address> |
addresses()
Address to be used in RootActorPath of refs generated for this transport.
|
abstract Address |
defaultAddress()
The default transport address of the ActorSystem
|
abstract Address |
localAddressForRemote(Address remote)
Resolves the correct local address to be used for contacting the given remote address
|
abstract LoggingAdapter |
log()
A Logger that can be used to log issues that may occur
|
scala.concurrent.Future<java.lang.Object> |
managementCommand(java.lang.Object cmd)
Sends a management command to the underlying transport stack.
|
RemoteActorRefProvider |
provider() |
abstract void |
quarantine(Address address,
scala.Option<java.lang.Object> uid,
java.lang.String reason)
Marks a remote system as out of sync and prevents reconnects until the quarantine timeout elapses.
|
abstract void |
send(java.lang.Object message,
OptionVal<ActorRef> senderOption,
RemoteActorRef recipient)
Sends the given message to the recipient supplying the sender() if any
|
abstract scala.concurrent.Future<Done> |
shutdown()
Shuts down the remoting
|
abstract void |
start()
Start up the transport, i.e.
|
ExtendedActorSystem |
system() |
public RemoteTransport(ExtendedActorSystem system, RemoteActorRefProvider provider)
public ExtendedActorSystem system()
public RemoteActorRefProvider provider()
public abstract scala.concurrent.Future<Done> shutdown()
public abstract scala.collection.immutable.Set<Address> addresses()
public abstract Address defaultAddress()
public abstract Address localAddressForRemote(Address remote)
remote
- the remote addresspublic abstract void start()
public abstract void send(java.lang.Object message, OptionVal<ActorRef> senderOption, RemoteActorRef recipient)
message
- (undocumented)senderOption
- (undocumented)recipient
- (undocumented)public scala.concurrent.Future<java.lang.Object> managementCommand(java.lang.Object cmd)
cmd
- Command message to send to the transports.public abstract LoggingAdapter log()
public abstract void quarantine(Address address, scala.Option<java.lang.Object> uid, java.lang.String reason)
address
- Address of the remote system to be quarantineduid
- UID of the remote system, if the uid is not defined it will not be a strong quarantine but
the current endpoint writer will be stopped (dropping system messages) and the address will be gatedreason
- (undocumented)