KlusterKite  0.0.0
A framework to create scalable and redundant services based on awesome Akka.Net project.
KlusterKite.Core.TestKit.TestMessageRouter Class Reference

Mocked message router More...

Inheritance diagram for KlusterKite.Core.TestKit.TestMessageRouter:
KlusterKite.Core.IMessageRouter

Public Member Functions

 TestMessageRouter (IActorRef testActor)
 Initializes a new instance of the TestMessageRouter class. More...
 
Task< T > Ask< T > (Address nodeAddress, string path, object message, TimeSpan timeout)
 Sends message to the specified actor path on the specified node. See also Futures.Ask(Akka.Actor.ICanTell,object,System.Nullable<System.TimeSpan>) More...
 
void RegisterVirtualNode (Address address, IActorRef receiver)
 Registers virtual node as actor, that would receive all messages as TestMessage<T> More...
 
void Tell (Address nodeAddress, string path, object message, IActorRef sender=null)
 Sends message to the specified actor path on the specified node More...
 

Detailed Description

Mocked message router

Definition at line 27 of file TestMessageRouter.cs.

Constructor & Destructor Documentation

◆ TestMessageRouter()

KlusterKite.Core.TestKit.TestMessageRouter.TestMessageRouter ( IActorRef  testActor)

Initializes a new instance of the TestMessageRouter class.

Parameters
testActorThe test actor.

Definition at line 45 of file TestMessageRouter.cs.

Member Function Documentation

◆ Ask< T >()

Task<T> KlusterKite.Core.TestKit.TestMessageRouter.Ask< T > ( Address  nodeAddress,
string  path,
object  message,
TimeSpan  timeout 
)

Sends message to the specified actor path on the specified node. See also Futures.Ask(Akka.Actor.ICanTell,object,System.Nullable<System.TimeSpan>)

Template Parameters
TThe type of awaited response
Parameters
nodeAddressThe node address.
pathThe recipient path.
messageThe message.
timeoutThe maximum time to wait for response
Returns
The response

Implements KlusterKite.Core.IMessageRouter.

Definition at line 59 of file TestMessageRouter.cs.

◆ RegisterVirtualNode()

void KlusterKite.Core.TestKit.TestMessageRouter.RegisterVirtualNode ( Address  address,
IActorRef  receiver 
)

Registers virtual node as actor, that would receive all messages as TestMessage<T>

Parameters
addressThe virtual node address
receiverVirtual node representative

Definition at line 81 of file TestMessageRouter.cs.

◆ Tell()

void KlusterKite.Core.TestKit.TestMessageRouter.Tell ( Address  nodeAddress,
string  path,
object  message,
IActorRef  sender = null 
)

Sends message to the specified actor path on the specified node

Parameters
nodeAddressThe node address.
pathThe recipient path.
messageThe message.
senderThe sender.

Implements KlusterKite.Core.IMessageRouter.

Definition at line 101 of file TestMessageRouter.cs.


The documentation for this class was generated from the following file: