|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object akka.remote.RemoteTransport
public abstract class RemoteTransport
The remote transport is responsible for sending and receiving messages. Each transport has an address, which it should provide in Serialization.currentTransportAddress (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 Summary | |
---|---|
RemoteTransport(ExtendedActorSystem system,
RemoteActorRefProvider provider)
|
Method Summary | |
---|---|
abstract Address |
address()
Address to be used in RootActorPath of refs generated for this transport. |
RemoteProtocol.AkkaRemoteProtocol |
createControlEnvelope(RemoteProtocol.RemoteControlProtocol rcp)
Returns a newly created AkkaRemoteProtocol with the given control payload. |
RemoteProtocol.AkkaRemoteProtocol |
createMessageSendEnvelope(RemoteProtocol.RemoteMessageProtocol rmp)
Returns a newly created AkkaRemoteProtocol with the given message payload. |
RemoteProtocol.RemoteMessageProtocol.Builder |
createRemoteMessageProtocolBuilder(ActorRef recipient,
java.lang.Object message,
scala.Option<ActorRef> senderOption)
Returns a new RemoteMessageProtocol containing the serialized representation of the given parameters. |
abstract LoggingAdapter |
log()
A Logger that can be used to log issues that may occur |
protected abstract boolean |
logRemoteLifeCycleEvents()
When this method returns true, RemoteLifeCycleEvents will be logged as well as be put onto the eventStream. |
void |
notifyListeners(RemoteLifeCycleEvent message)
Default implementation both publishes the message to the eventStream as well as logs it using the system logger |
RemoteActorRefProvider |
provider()
|
void |
receiveMessage(RemoteMessage remoteMessage)
Call this method with an inbound RemoteMessage and this will take care of security (see: "useUntrustedMode") as well as making sure that the message ends up at its destination (best effort). |
abstract boolean |
restartClientConnection(Address address)
Restarts a specific client connected to the supplied remote address, but only if the client is not shut down |
abstract void |
send(java.lang.Object message,
scala.Option<ActorRef> senderOption,
akka.remote.RemoteActorRef recipient)
Sends the given message to the recipient supplying the sender if any |
abstract void |
shutdown()
Shuts down the remoting |
abstract boolean |
shutdownClientConnection(Address address)
Shuts down a specific client connected to the supplied remote address returns true if successful |
abstract void |
start()
Start up the transport, i.e. enable incoming connections. |
ExtendedActorSystem |
system()
|
RemoteProtocol.ActorRefProtocol |
toRemoteActorRefProtocol(ActorRef actor)
Serializes the ActorRef instance into a Protocol Buffers (protobuf) Message. |
java.lang.String |
toString()
Returns this RemoteTransports Address' textual representation |
protected abstract boolean |
useUntrustedMode()
When this method returns true, some functionality will be turned off for security purposes. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public RemoteTransport(ExtendedActorSystem system, RemoteActorRefProvider provider)
Method Detail |
---|
public ExtendedActorSystem system()
public RemoteActorRefProvider provider()
public abstract void shutdown()
public abstract Address address()
public abstract void start()
public abstract boolean shutdownClientConnection(Address address)
public abstract boolean restartClientConnection(Address address)
public abstract void send(java.lang.Object message, scala.Option<ActorRef> senderOption, akka.remote.RemoteActorRef recipient)
public void notifyListeners(RemoteLifeCycleEvent message)
public java.lang.String toString()
toString
in class java.lang.Object
public abstract LoggingAdapter log()
protected abstract boolean useUntrustedMode()
protected abstract boolean logRemoteLifeCycleEvents()
public RemoteProtocol.AkkaRemoteProtocol createMessageSendEnvelope(RemoteProtocol.RemoteMessageProtocol rmp)
public RemoteProtocol.AkkaRemoteProtocol createControlEnvelope(RemoteProtocol.RemoteControlProtocol rcp)
public RemoteProtocol.ActorRefProtocol toRemoteActorRefProtocol(ActorRef actor)
public RemoteProtocol.RemoteMessageProtocol.Builder createRemoteMessageProtocolBuilder(ActorRef recipient, java.lang.Object message, scala.Option<ActorRef> senderOption)
public void receiveMessage(RemoteMessage remoteMessage)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |