Interface Transport
-
- All Known Implementing Classes:
AbstractTransportAdapter
,ActorTransportAdapter
,NettyTransport
,TestTransport
,ThrottlerTransportAdapter
public interface Transport
Deprecated.Classic remoting is deprecated, use Artery. Since 2.6.0.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
Config
and anExtendedActorSystem
as parameters.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static class
Transport.ActorAssociationEventListener
Deprecated.Class to convert ordinaryActorRef
instances to an AssociationEventListener.static class
Transport.ActorAssociationEventListener$
Deprecated.static interface
Transport.AssociationEvent
Deprecated.static interface
Transport.AssociationEventListener
Deprecated.An interface that needs to be implemented by the user of a transport to listen to association eventsstatic class
Transport.InboundAssociation
Deprecated.Message sent to aTransport.AssociationEventListener
registered to a transport (via the Promise returned bylisten()
) when an inbound association request arrives.static class
Transport.InboundAssociation$
Deprecated.static class
Transport.InvalidAssociationException
Deprecated.Indicates that the association setup request is invalid, and it is impossible to recover (malformed IP address, hostname, etc.).static class
Transport.InvalidAssociationException$
Deprecated.
-
Method Summary
All Methods Instance Methods Abstract Methods Deprecated Methods Modifier and Type Method Description scala.concurrent.Future<AssociationHandle>
associate(Address remoteAddress)
Deprecated.Asynchronously opens a logical duplex link between two Transport Entities over a network.boolean
isResponsibleFor(Address address)
Deprecated.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()
Deprecated.Asynchronously attempts to setup the transport layer to listen and accept incoming associations.scala.concurrent.Future<java.lang.Object>
managementCommand(java.lang.Object cmd)
Deprecated.This method allows upper layers to send management commands to the transport.int
maximumPayloadBytes()
Deprecated.Defines the maximum size of payload this transport is able to deliver.java.lang.String
schemeIdentifier()
Deprecated.Returns a string that will be used as the scheme part of the URLs corresponding to this transportscala.concurrent.Future<java.lang.Object>
shutdown()
Deprecated.Shuts down the transport layer and releases all the corresponding resources.
-
-
-
Method Detail
-
schemeIdentifier
java.lang.String schemeIdentifier()
Deprecated.Returns a string that will be used as the scheme part of the URLs corresponding to this transport- Returns:
- the scheme string
-
isResponsibleFor
boolean isResponsibleFor(Address address)
Deprecated.A function that decides whether the specific transport instance is responsible for delivering to a given address. The function must be thread-safe and non-blocking.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.
- Returns:
- whether the transport instance is responsible to serve communications to the given address.
-
maximumPayloadBytes
int maximumPayloadBytes()
Deprecated.Defines the maximum size of payload this transport is able to deliver. All transports MUST support at least 32kBytes (32000 octets) of payload, but some MAY support larger sizes.- Returns:
-
listen
scala.concurrent.Future<scala.Tuple2<Address,scala.concurrent.Promise<Transport.AssociationEventListener>>> listen()
Deprecated.Asynchronously attempts to setup the transport layer to listen and accept incoming associations. The result of the attempt is wrapped by a Future returned by this method. The pair contained in the future contains a Promise for an ActorRef. By completing this Promise with anTransport.AssociationEventListener
, that listener becomes responsible for handling incoming associations. Until the Promise is not completed, no associations are processed.- Returns:
- A Future containing a pair of the bound local address and a Promise of an AssociationListener that must be completed by the consumer of the future.
-
associate
scala.concurrent.Future<AssociationHandle> associate(Address remoteAddress)
Deprecated.Asynchronously opens a logical duplex link between two Transport Entities over a network. It could be backed by a real transport-layer connection (TCP), more lightweight connections provided over datagram protocols (UDP with additional services), substreams of multiplexed connections (SCTP) or physical links (serial port).This call returns a future of an
AssociationHandle
. A failed future indicates that the association attempt was unsuccessful. If the exception isTransport.InvalidAssociationException
then the association request was invalid, and it is impossible to recover.- Parameters:
remoteAddress
- The address of the remote transport entity.- Returns:
- A status instance representing failure or a success containing an
AssociationHandle
-
shutdown
scala.concurrent.Future<java.lang.Object> shutdown()
Deprecated.Shuts down the transport layer and releases all the corresponding resources. Shutdown is asynchronous signalling the end of the shutdown by completing the returned future.The transport SHOULD try flushing pending writes before becoming completely closed.
- Returns:
- Future signalling the completion of shutdown
-
managementCommand
scala.concurrent.Future<java.lang.Object> managementCommand(java.lang.Object cmd)
Deprecated.This method allows upper layers to send management commands to the transport. It is the responsibility of the sender to send appropriate commands to different transport implementations. Unknown commands will be ignored.- Parameters:
cmd
- Command message to the transport- Returns:
- Future that succeeds when the command was handled or dropped
-
-