Search in sources :

Example 6 with ChunkedInfoMessage

use of org.openkilda.messaging.info.ChunkedInfoMessage in project open-kilda by telstra.

the class KafkaMessagingChannelTest method prepareChunkedResponses.

/**
 * Creates chunk of responses started from requestId, with predefined size.
 */
private void prepareChunkedResponses(String requestId, long timestamp, int size) {
    for (int i = 0; i < size; i++) {
        InfoData data = new SwitchInfoData(new SwitchId(i), SwitchChangeType.ACTIVATED, null, null, null, null, false);
        ChunkedInfoMessage response = new ChunkedInfoMessage(data, timestamp, requestId, requestId + i, size);
        CHUNKED_RESPONSES.add(response);
    }
}
Also used : SwitchInfoData(org.openkilda.messaging.info.event.SwitchInfoData) InfoData(org.openkilda.messaging.info.InfoData) ChunkedInfoMessage(org.openkilda.messaging.info.ChunkedInfoMessage) SwitchId(org.openkilda.model.SwitchId) SwitchInfoData(org.openkilda.messaging.info.event.SwitchInfoData)

Aggregations

ChunkedInfoMessage (org.openkilda.messaging.info.ChunkedInfoMessage)6 InfoData (org.openkilda.messaging.info.InfoData)6 Message (org.openkilda.messaging.Message)4 ErrorMessage (org.openkilda.messaging.error.ErrorMessage)3 InfoMessage (org.openkilda.messaging.info.InfoMessage)3 ArrayList (java.util.ArrayList)2 Values (org.apache.storm.tuple.Values)2 SwitchInfoData (org.openkilda.messaging.info.event.SwitchInfoData)2 List (java.util.List)1 Test (org.junit.Test)1 CommandMessage (org.openkilda.messaging.command.CommandMessage)1 ClientErrorMessage (org.openkilda.messaging.error.ClientErrorMessage)1 SwitchId (org.openkilda.model.SwitchId)1