Open Kilda Java Documentation
org.openkilda.northbound.MessageExchanger Class Reference
Inheritance diagram for org.openkilda.northbound.MessageExchanger:
org.openkilda.northbound.messaging.MessageConsumer< T > org.openkilda.northbound.messaging.MessageProducer

Public Member Functions

 MessageExchanger ()
 
 MessageExchanger (Message response, String correlationId)
 
Message poll (String correlationId)
 
void clear ()
 
void send (String topic, Message message)
 
void mockResponse (Message message)
 
void resetMockedResponses ()
 

Additional Inherited Members

- Public Attributes inherited from org.openkilda.northbound.messaging.MessageConsumer< T >
int POLL_TIMEOUT = 120 * 1000
 
int POLL_PAUSE = 100
 
- Public Attributes inherited from org.openkilda.northbound.messaging.MessageProducer
int TIMEOUT = 1000
 

Detailed Description

Message producer/consumer implementation for testing purposes. Processes all send/poll operations and sends back prepared in advance responses by specified request id (correlation id).

Definition at line 29 of file MessageExchanger.java.

Constructor & Destructor Documentation

◆ MessageExchanger() [1/2]

org.openkilda.northbound.MessageExchanger.MessageExchanger ( )

Definition at line 33 of file MessageExchanger.java.

◆ MessageExchanger() [2/2]

org.openkilda.northbound.MessageExchanger.MessageExchanger ( Message  response,
String  correlationId 
)

Definition at line 35 of file MessageExchanger.java.

Member Function Documentation

◆ clear()

void org.openkilda.northbound.MessageExchanger.clear ( )

Clears message queue.

Implements org.openkilda.northbound.messaging.MessageConsumer< T >.

Definition at line 45 of file MessageExchanger.java.

◆ mockResponse()

void org.openkilda.northbound.MessageExchanger.mockResponse ( Message  message)

Definition at line 57 of file MessageExchanger.java.

◆ poll()

Message org.openkilda.northbound.MessageExchanger.poll ( String  correlationId)

Polls Kafka message queue.

Parameters
correlationIdcorrelation id
Returns
received message

Implements org.openkilda.northbound.messaging.MessageConsumer< T >.

Definition at line 40 of file MessageExchanger.java.

◆ resetMockedResponses()

void org.openkilda.northbound.MessageExchanger.resetMockedResponses ( )

Definition at line 61 of file MessageExchanger.java.

◆ send()

void org.openkilda.northbound.MessageExchanger.send ( String  topic,
Message  message 
)

Sends messages to WorkFlowManager.

Parameters
topickafka topic
messagemessage to serialize and send

Implements org.openkilda.northbound.messaging.MessageProducer.

Definition at line 49 of file MessageExchanger.java.


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