|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface Transport
An SPI layer for implementing asynchronous transport mechanisms. The Transport is responsible for initializing the underlying transmission mechanism and setting up logical links between transport entities.
Transport implementations that are loaded dynamically by the remoting must have a constructor that accepts a
com.typesafe.config.Config
and an ExtendedActorSystem
as parameters.
Nested Class Summary | |
---|---|
static class |
Transport.ActorAssociationEventListener
Class to convert ordinary ActorRef instances to an AssociationEventListener. |
static class |
Transport.ActorAssociationEventListener$
|
static interface |
Transport.AssociationEvent
|
static interface |
Transport.AssociationEventListener
An interface that needs to be implemented by the user of a transport to listen to association events |
static class |
Transport.InboundAssociation
Message sent to a Transport.AssociationEventListener registered to a transport
(via the Promise returned by akka.remote.transport.Transport.listen ) when an inbound association request arrives. |
static class |
Transport.InboundAssociation$
|
static class |
Transport.InvalidAssociationException
Indicates that the association setup request is invalid, and it is impossible to recover (malformed IP address, hostname, etc.). |
static class |
Transport.InvalidAssociationException$
|
Method Summary | |
---|---|
scala.concurrent.Future<AssociationHandle> |
associate(Address remoteAddress)
Asynchronously opens a logical duplex link between two Transport Entities over a network. |
boolean |
isResponsibleFor(Address address)
A function that decides whether the specific transport instance is responsible for delivering to a given address. |
scala.concurrent.Future<scala.Tuple2<Address,scala.concurrent.Promise<Transport.AssociationEventListener>>> |
listen()
Asynchronously attempts to setup the transport layer to listen and accept incoming associations. |
scala.concurrent.Future<java.lang.Object> |
managementCommand(java.lang.Object cmd)
This method allows upper layers to send management commands to the transport. |
int |
maximumPayloadBytes()
Defines the maximum size of payload this transport is able to deliver. |
java.lang.String |
schemeIdentifier()
Returns a string that will be used as the scheme part of the URLs corresponding to this transport |
scala.concurrent.Future<java.lang.Object> |
shutdown()
Shuts down the transport layer and releases all the corresponding resources. |
Method Detail |
---|
java.lang.String schemeIdentifier()
boolean isResponsibleFor(Address address)
The purpose of this function is to resolve cases when the scheme part of an URL is not enough to resolve the correct transport i.e. multiple instances of the same transport implementation are loaded. These cases arise when - the same transport, but with different configurations is used for different remote systems - a transport is able to serve one address only (hardware protocols, e.g. Serial port) and multiple instances are needed to be loaded for different endpoints.
address
- (undocumented)
int maximumPayloadBytes()
scala.concurrent.Future<scala.Tuple2<Address,scala.concurrent.Promise<Transport.AssociationEventListener>>> listen()
Transport.AssociationEventListener
, that
listener becomes responsible for handling incoming associations. Until the Promise is not completed, no associations
are processed.
scala.concurrent.Future<AssociationHandle> associate(Address remoteAddress)
This call returns a future of an AssociationHandle
. A failed future indicates that
the association attempt was unsuccessful. If the exception is Transport.InvalidAssociationException
then the association request was invalid, and it is impossible to recover.
remoteAddress
- The address of the remote transport entity.
AssociationHandle
scala.concurrent.Future<java.lang.Object> shutdown()
The transport SHOULD try flushing pending writes before becoming completely closed.
scala.concurrent.Future<java.lang.Object> managementCommand(java.lang.Object cmd)
cmd
- Command message to the transport
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |