AssociationRegistry

org.apache.pekko.remote.transport.TestTransport.AssociationRegistry

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

Attributes

Source
TestTransport.scala
Graph
Supertypes
class Object
trait Matchable
class Any

Members list

Value members

Concrete methods

def clearLog(): Unit

Clears the activity log.

Clears the activity log.

Attributes

Source
TestTransport.scala

Removes an association.

Removes an association.

Value parameters

key

Ordered pair of addresses representing an association. First element is the address of the initiator.

Attributes

Returns

The original entries.

Source
TestTransport.scala
def existsAssociation(initiatorAddress: Address, remoteAddress: Address): Boolean

Tests if an association was registered.

Tests if an association was registered.

Value parameters

initiatorAddress

The initiator of the association.

remoteAddress

The other address of the association.

Attributes

Returns

True if there is an association for the given addresses.

Source
TestTransport.scala

Returns the event handler corresponding to the remote endpoint of the given local handle. In other words it returns the listener that will receive InboundPayload events when

Returns the event handler corresponding to the remote endpoint of the given local handle. In other words it returns the listener that will receive InboundPayload events when

write()

is called on the given handle.

Value parameters

localHandle

The handle

Attributes

Returns

The option that contains the Future for the listener if exists.

Source
TestTransport.scala
def logActivity(activity: Activity): Unit

Logs a transport activity.

Logs a transport activity.

Value parameters

activity

Activity to be logged.

Attributes

Source
TestTransport.scala

Takes a thread-safe snapshot of the current state of the activity log.

Takes a thread-safe snapshot of the current state of the activity log.

Attributes

Returns

Collection containing activities ordered left-to-right according to time (first element is earliest).

Source
TestTransport.scala

Registers a Future of two handle event listeners corresponding to the two endpoints of an association.

Registers a Future of two handle event listeners corresponding to the two endpoints of an association.

Value parameters

key

Ordered pair of addresses representing an association. First element must be the address of the initiator.

listeners

The future containing the listeners that will be responsible for handling the events of the two endpoints of the association. Elements in the pair must be in the same order as the addresses in the key parameter.

Attributes

Source
TestTransport.scala
def registerTransport(transport: TestTransport, associationEventListenerFuture: Future[AssociationEventListener]): Unit

Records a mapping between an address and the corresponding (transport, associationEventListener) pair.

Records a mapping between an address and the corresponding (transport, associationEventListener) pair.

Value parameters

associationEventListenerFuture

The future that will be completed with the listener that will handle the events for the given transport.

transport

The transport that is to be registered. The address of this transport will be used as key.

Attributes

Source
TestTransport.scala

Returns the remote endpoint for a pair of endpoints relative to the owner of the supplied handle.

Returns the remote endpoint for a pair of endpoints relative to the owner of the supplied handle.

Value parameters

handle

the reference handle to determine the remote endpoint relative to

listenerPair

pair of listeners in initiator, receiver order.

Attributes

Source
TestTransport.scala
def reset(): Unit

Resets the state of the registry. ''Warning!'' This method is not atomic.

Resets the state of the registry. ''Warning!'' This method is not atomic.

Attributes

Source
TestTransport.scala

Returns the Transport bound to the given address.

Returns the Transport bound to the given address.

Value parameters

address

The address bound to the transport.

Attributes

Returns

The transport if exists.

Source
TestTransport.scala
def transportsReady(addresses: Address*): Boolean

Indicates if all given transports were successfully registered. No associations can be established between transports that are not yet registered.

Indicates if all given transports were successfully registered. No associations can be established between transports that are not yet registered.

Value parameters

addresses

The listen addresses of transports that participate in the test case.

Attributes

Returns

True if all transports are successfully registered.

Source
TestTransport.scala