Transport.ActorAssociationEventListener, Transport.ActorAssociationEventListener$, Transport.AssociationEvent, Transport.AssociationEventListener, Transport.InboundAssociation, Transport.InboundAssociation$, Transport.InvalidAssociationException, Transport.InvalidAssociationException$| Constructor and Description |
|---|
NettyTransport(akka.actor.ExtendedActorSystem system,
com.typesafe.config.Config conf) |
NettyTransport(NettyTransportSettings settings,
akka.actor.ExtendedActorSystem system) |
| Modifier and Type | Method and Description |
|---|---|
static scala.Option<akka.actor.Address> |
addressFromSocketAddress(java.net.SocketAddress addr,
java.lang.String schemeIdentifier,
java.lang.String systemName,
scala.Option<java.lang.String> hostName,
scala.Option<java.lang.Object> port) |
scala.concurrent.Future<java.net.InetSocketAddress> |
addressToSocketAddress(akka.actor.Address addr) |
scala.concurrent.Future<AssociationHandle> |
associate(akka.actor.Address remoteAddress)
Asynchronously opens a logical duplex link between two Transport Entities over a network.
|
akka.actor.Address |
boundAddress() |
org.jboss.netty.channel.group.DefaultChannelGroup |
channelGroup() |
scala.concurrent.ExecutionContext |
executionContext() |
static int |
FrameLengthFieldLength() |
static void |
gracefulClose(org.jboss.netty.channel.Channel channel,
scala.concurrent.ExecutionContext ec) |
boolean |
isResponsibleFor(akka.actor.Address address)
A function that decides whether the specific transport instance is responsible for delivering
to a given address.
|
scala.concurrent.Future<scala.Tuple2<akka.actor.Address,scala.concurrent.Promise<Transport.AssociationEventListener>>> |
listen()
Asynchronously attempts to setup the transport layer to listen and accept incoming associations.
|
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
|
NettyTransportSettings |
settings() |
scala.concurrent.Future<java.lang.Object> |
shutdown()
Shuts down the transport layer and releases all the corresponding resources.
|
akka.actor.ExtendedActorSystem |
system() |
java.util.concurrent.ConcurrentHashMap<java.net.SocketAddress,AssociationHandle.HandleEventListener> |
udpConnectionTable()
INTERNAL API
|
static java.util.concurrent.atomic.AtomicInteger |
uniqueIdCounter() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitmanagementCommandpublic NettyTransport(NettyTransportSettings settings, akka.actor.ExtendedActorSystem system)
public NettyTransport(akka.actor.ExtendedActorSystem system,
com.typesafe.config.Config conf)
public static int FrameLengthFieldLength()
public static void gracefulClose(org.jboss.netty.channel.Channel channel,
scala.concurrent.ExecutionContext ec)
public static java.util.concurrent.atomic.AtomicInteger uniqueIdCounter()
public static scala.Option<akka.actor.Address> addressFromSocketAddress(java.net.SocketAddress addr,
java.lang.String schemeIdentifier,
java.lang.String systemName,
scala.Option<java.lang.String> hostName,
scala.Option<java.lang.Object> port)
public NettyTransportSettings settings()
public akka.actor.ExtendedActorSystem system()
public scala.concurrent.ExecutionContext executionContext()
public java.lang.String schemeIdentifier()
TransportschemeIdentifier in interface Transportpublic int maximumPayloadBytes()
TransportmaximumPayloadBytes in interface Transportpublic final java.util.concurrent.ConcurrentHashMap<java.net.SocketAddress,AssociationHandle.HandleEventListener> udpConnectionTable()
public org.jboss.netty.channel.group.DefaultChannelGroup channelGroup()
public boolean isResponsibleFor(akka.actor.Address address)
TransportThe 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.
isResponsibleFor in interface Transportaddress - (undocumented)public scala.concurrent.Future<java.net.InetSocketAddress> addressToSocketAddress(akka.actor.Address addr)
public scala.concurrent.Future<scala.Tuple2<akka.actor.Address,scala.concurrent.Promise<Transport.AssociationEventListener>>> listen()
TransportTransport.AssociationEventListener, that
listener becomes responsible for handling incoming associations. Until the Promise is not completed, no associations
are processed.
public akka.actor.Address boundAddress()
boundAddress in interface Transportpublic scala.concurrent.Future<AssociationHandle> associate(akka.actor.Address remoteAddress)
Transport
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.
associate in interface TransportremoteAddress - The address of the remote transport entity.AssociationHandlepublic scala.concurrent.Future<java.lang.Object> shutdown()
TransportThe transport SHOULD try flushing pending writes before becoming completely closed.