TestTransport

org.apache.pekko.remote.transport.TestTransport
See theTestTransport companion class
object TestTransport

Attributes

Companion
class
Deprecated
true
Source
TestTransport.scala
Graph
Supertypes
class Object
trait Matchable
class Any
Self type

Members list

Type members

Classlikes

sealed trait Activity

Base trait for activities that are logged by pekko.remote.transport.TestTransport.

Base trait for activities that are logged by pekko.remote.transport.TestTransport.

Attributes

Source
TestTransport.scala
Supertypes
class Object
trait Matchable
class Any
Known subtypes
final case class AssociateAttempt(localAddress: Address, remoteAddress: Address) extends Activity

Attributes

Source
TestTransport.scala
Supertypes
trait Serializable
trait Product
trait Equals
trait Activity
class Object
trait Matchable
class Any
Show all

Shared state among pekko.remote.transport.TestTransport instances. Coordinates the transports and the means of communication between them.

Shared state among pekko.remote.transport.TestTransport instances. Coordinates the transports and the means of communication between them.

Attributes

Source
TestTransport.scala
Supertypes
class Object
trait Matchable
class Any
final case class DisassociateAttempt(requester: Address, remote: Address) extends Activity

Attributes

Source
TestTransport.scala
Supertypes
trait Serializable
trait Product
trait Equals
trait Activity
class Object
trait Matchable
class Any
Show all
final case class ListenAttempt(boundAddress: Address) extends Activity

Attributes

Source
TestTransport.scala
Supertypes
trait Serializable
trait Product
trait Equals
trait Activity
class Object
trait Matchable
class Any
Show all
final case class ShutdownAttempt(boundAddress: Address) extends Activity

Attributes

Source
TestTransport.scala
Supertypes
trait Serializable
trait Product
trait Equals
trait Activity
class Object
trait Matchable
class Any
Show all
class SwitchableLoggedBehavior[A, B](defaultBehavior: A => B, logCallback: A => Unit) extends A => B

Test utility to make behavior of functions that return some Future[B] controllable from tests. This tool is able to overwrite default behavior with any generic behavior, including failure, and exposes control to the timing of the completion of the returned future.

Test utility to make behavior of functions that return some Future[B] controllable from tests. This tool is able to overwrite default behavior with any generic behavior, including failure, and exposes control to the timing of the completion of the returned future.

The utility is implemented as a stack of behaviors, where the behavior on the top of the stack represents the currently active behavior. The bottom of the stack always contains the defaultBehavior which can not be popped out.

Value parameters

defaultBehavior

The original behavior that might be overwritten. It is always possible to restore this behavior

logCallback

Function that will be called independently of the current active behavior type parameter A:

  • Parameter type of the wrapped function. If it takes multiple parameters it must be wrapped in a tuple. type parameter B:
  • Type parameter of the future that the original function returns.

Attributes

Source
TestTransport.scala
Supertypes
trait A => Future[B]
class Object
trait Matchable
class Any
final case class WriteAttempt(sender: Address, recipient: Address, payload: ByteString) extends Activity

Attributes

Source
TestTransport.scala
Supertypes
trait Serializable
trait Product
trait Equals
trait Activity
class Object
trait Matchable
class Any
Show all

Types

type Behavior[A, B] = A => Future[B]

Attributes

Source
TestTransport.scala