class TestTransport extends Transport

Transport implementation to be used for testing.

The TestTransport is basically a shared memory between actor systems. The TestTransport could be programmed to emulate different failure modes of a Transport implementation. TestTransport keeps a log of the activities it was requested to do. This class is not optimized for performance and MUST not be used as an in-memory transport in production systems.

Source
TestTransport.scala
Linear Supertypes
Type Hierarchy
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. TestTransport
  2. Transport
  3. AnyRef
  4. Any
Implicitly
  1. by any2stringadd
  2. by StringFormat
  3. by Ensuring
  4. by ArrowAssoc
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new TestTransport(system: ExtendedActorSystem, conf: Config)
  2. new TestTransport(localAddress: Address, registry: TestTransport.AssociationRegistry, maximumPayloadBytes: Int = 32000, schemeIdentifier: String = "test")

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int
    Definition Classes
    AnyRef → Any
  3. def +(other: String): String
    Implicit
    This member is added by an implicit conversion from TestTransport to any2stringadd[TestTransport] performed by method any2stringadd in scala.Predef.
    Definition Classes
    any2stringadd
  4. def ->[B](y: B): (TestTransport, B)
    Implicit
    This member is added by an implicit conversion from TestTransport to ArrowAssoc[TestTransport] performed by method ArrowAssoc in scala.Predef.
    Definition Classes
    ArrowAssoc
    Annotations
    @inline()
  5. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  6. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  7. def associate(remoteAddress: Address): Future[AssociationHandle]

    Asynchronously opens a logical duplex link between two Transport Entities over a network.

    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 akka.remote.transport.AssociationHandle. A failed future indicates that the association attempt was unsuccessful. If the exception is akka.remote.transport.Transport.InvalidAssociationException then the association request was invalid, and it is impossible to recover.

    remoteAddress

    The address of the remote transport entity.

    returns

    A status instance representing failure or a success containing an akka.remote.transport.AssociationHandle

    Definition Classes
    TestTransportTransport
  8. val associateBehavior: SwitchableLoggedBehavior[Address, AssociationHandle]

    The akka.remote.transport.TestTransport.SwitchableLoggedBehavior for the associate() method.

  9. def clone(): AnyRef
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @native() @HotSpotIntrinsicCandidate() @throws( ... )
  10. val disassociateBehavior: SwitchableLoggedBehavior[TestAssociationHandle, Unit]

    The akka.remote.transport.TestTransport.SwitchableLoggedBehavior for the disassociate() method on handles.

    The akka.remote.transport.TestTransport.SwitchableLoggedBehavior for the disassociate() method on handles. All handle calls pass through this call.

  11. def ensuring(cond: (TestTransport) ⇒ Boolean, msg: ⇒ Any): TestTransport
    Implicit
    This member is added by an implicit conversion from TestTransport to Ensuring[TestTransport] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  12. def ensuring(cond: (TestTransport) ⇒ Boolean): TestTransport
    Implicit
    This member is added by an implicit conversion from TestTransport to Ensuring[TestTransport] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  13. def ensuring(cond: Boolean, msg: ⇒ Any): TestTransport
    Implicit
    This member is added by an implicit conversion from TestTransport to Ensuring[TestTransport] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  14. def ensuring(cond: Boolean): TestTransport
    Implicit
    This member is added by an implicit conversion from TestTransport to Ensuring[TestTransport] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  15. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  16. def equals(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  17. def formatted(fmtstr: String): String
    Implicit
    This member is added by an implicit conversion from TestTransport to StringFormat[TestTransport] performed by method StringFormat in scala.Predef.
    Definition Classes
    StringFormat
    Annotations
    @inline()
  18. final def getClass(): Class[_]
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  19. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  20. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  21. def isResponsibleFor(address: Address): Boolean

    A function that decides whether the specific transport instance is responsible for delivering to a given address.

    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.

    Definition Classes
    TestTransportTransport
  22. def listen: Future[(Address, Promise[AssociationEventListener])]

    Asynchronously attempts to setup the transport layer to listen and accept incoming associations.

    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 an akka.remote.transport.Transport.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.

    Definition Classes
    TestTransportTransport
  23. val listenBehavior: SwitchableLoggedBehavior[Unit, (Address, Promise[AssociationEventListener])]

    The akka.remote.transport.TestTransport.SwitchableLoggedBehavior for the listen() method.

  24. val localAddress: Address
  25. def managementCommand(cmd: Any): Future[Boolean]

    This method allows upper layers to send management commands to the transport.

    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.

    cmd

    Command message to the transport

    returns

    Future that succeeds when the command was handled or dropped

    Definition Classes
    Transport
  26. val maximumPayloadBytes: Int

    Defines the maximum size of payload this transport is able to deliver.

    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.

    Definition Classes
    TestTransportTransport
  27. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  28. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  29. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  30. final val registry: TestTransport.AssociationRegistry
  31. val schemeIdentifier: String

    Returns a string that will be used as the scheme part of the URLs corresponding to this transport

    Returns a string that will be used as the scheme part of the URLs corresponding to this transport

    returns

    the scheme string

    Definition Classes
    TestTransportTransport
  32. def shutdown(): Future[Boolean]

    Shuts down the transport layer and releases all the corresponding resources.

    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

    Definition Classes
    TestTransportTransport
  33. val shutdownBehavior: SwitchableLoggedBehavior[Unit, Boolean]

    The akka.remote.transport.TestTransport.SwitchableLoggedBehavior for the shutdown() method.

  34. final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
    AnyRef
  35. def toString(): String
    Definition Classes
    TestTransport → AnyRef → Any
  36. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  37. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @throws( ... )
  38. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  39. val writeBehavior: SwitchableLoggedBehavior[(TestAssociationHandle, ByteString), Boolean]

    The akka.remote.transport.TestTransport.SwitchableLoggedBehavior for the write() method on handles.

    The akka.remote.transport.TestTransport.SwitchableLoggedBehavior for the write() method on handles. All handle calls pass through this call. Please note, that write operations return a Boolean synchronously, so altering the behavior via pushDelayed will turn write to a blocking operation -- use of pushDelayed therefore is not recommended.

  40. def [B](y: B): (TestTransport, B)
    Implicit
    This member is added by an implicit conversion from TestTransport to ArrowAssoc[TestTransport] performed by method ArrowAssoc in scala.Predef.
    Definition Classes
    ArrowAssoc

Deprecated Value Members

  1. def finalize(): Unit
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @Deprecated @deprecated @throws( classOf[java.lang.Throwable] )
    Deprecated

    (Since version ) see corresponding Javadoc for more information.

Inherited from Transport

Inherited from AnyRef

Inherited from Any

Inherited by implicit conversion any2stringadd from TestTransport to any2stringadd[TestTransport]

Inherited by implicit conversion StringFormat from TestTransport to StringFormat[TestTransport]

Inherited by implicit conversion Ensuring from TestTransport to Ensuring[TestTransport]

Inherited by implicit conversion ArrowAssoc from TestTransport to ArrowAssoc[TestTransport]

Ungrouped