akka.remote
Class RemoteTransport

java.lang.Object
  extended by akka.remote.RemoteTransport
Direct Known Subclasses:
Remoting

public abstract class RemoteTransport
extends java.lang.Object

INTERNAL API

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 Summary
RemoteTransport(ExtendedActorSystem system, RemoteActorRefProvider provider)
           
 
Method Summary
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
protected abstract  boolean logRemoteLifeCycleEvents()
          When this method returns true, RemoteLifeCycleEvents will be logged as well as be put onto the eventStream.
 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)
          Marks a remote system as out of sync and prevents reconnects until the quarantine timeout elapses.
abstract  void send(java.lang.Object message, scala.Option<ActorRef> senderOption, RemoteActorRef recipient)
          Sends the given message to the recipient supplying the sender() if any
abstract  scala.concurrent.Future<scala.runtime.BoxedUnit> shutdown()
          Shuts down the remoting
abstract  void start()
          Start up the transport, i.e.
 ExtendedActorSystem system()
           
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, toString, wait, wait, wait
 

Constructor Detail

RemoteTransport

public RemoteTransport(ExtendedActorSystem system,
                       RemoteActorRefProvider provider)
Method Detail

system

public ExtendedActorSystem system()

provider

public RemoteActorRefProvider provider()

shutdown

public abstract scala.concurrent.Future<scala.runtime.BoxedUnit> shutdown()
Shuts down the remoting

Returns:
(undocumented)

addresses

public abstract scala.collection.immutable.Set<Address> addresses()
Address to be used in RootActorPath of refs generated for this transport.

Returns:
(undocumented)

defaultAddress

public abstract Address defaultAddress()
The default transport address of the actorsystem

Returns:
The listen address of the default transport

localAddressForRemote

public abstract Address localAddressForRemote(Address remote)
Resolves the correct local address to be used for contacting the given remote address

Parameters:
remote - the remote address
Returns:
the local address to be used for the given remote address

start

public abstract void start()
Start up the transport, i.e. enable incoming connections.


send

public abstract void send(java.lang.Object message,
                          scala.Option<ActorRef> senderOption,
                          RemoteActorRef recipient)
Sends the given message to the recipient supplying the sender() if any

Parameters:
message - (undocumented)
senderOption - (undocumented)
recipient - (undocumented)

managementCommand

public scala.concurrent.Future<java.lang.Object> managementCommand(java.lang.Object cmd)
Sends a management command to the underlying transport stack. The call returns with a Future that indicates if the command was handled successfully or dropped.

Parameters:
cmd - Command message to send to the transports.
Returns:
A Future that indicates when the message was successfully handled or dropped.

log

public abstract LoggingAdapter log()
A Logger that can be used to log issues that may occur

Returns:
(undocumented)

quarantine

public abstract void quarantine(Address address,
                                scala.Option<java.lang.Object> uid)
Marks a remote system as out of sync and prevents reconnects until the quarantine timeout elapses.

Parameters:
address - Address of the remote system to be quarantined
uid - 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 gated

useUntrustedMode

protected abstract boolean useUntrustedMode()
When this method returns true, some functionality will be turned off for security purposes.

Returns:
(undocumented)

logRemoteLifeCycleEvents

protected abstract boolean logRemoteLifeCycleEvents()
When this method returns true, RemoteLifeCycleEvents will be logged as well as be put onto the eventStream.

Returns:
(undocumented)