Search in sources :

Example 1 with SyncRulesResponse

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

the class SwitchServiceImpl method syncRules.

@Override
public SyncRulesOutput syncRules(String switchId, String correlationId) {
    SyncRulesRequest request = new SyncRulesRequest(switchId);
    CommandWithReplyToMessage commandMessage = new CommandWithReplyToMessage(request, System.currentTimeMillis(), correlationId, Destination.TOPOLOGY_ENGINE, northboundTopic);
    messageProducer.send(topoEngTopic, commandMessage);
    Message message = messageConsumer.poll(correlationId);
    SyncRulesResponse response = (SyncRulesResponse) validateInfoMessage(commandMessage, message, correlationId);
    return switchMapper.toSuncRulesOutput(response);
}
Also used : SyncRulesResponse(org.openkilda.messaging.info.switches.SyncRulesResponse) Message(org.openkilda.messaging.Message) CommandMessage(org.openkilda.messaging.command.CommandMessage) CommandWithReplyToMessage(org.openkilda.messaging.command.CommandWithReplyToMessage) CommandWithReplyToMessage(org.openkilda.messaging.command.CommandWithReplyToMessage) SyncRulesRequest(org.openkilda.messaging.command.switches.SyncRulesRequest)

Aggregations

Message (org.openkilda.messaging.Message)1 CommandMessage (org.openkilda.messaging.command.CommandMessage)1 CommandWithReplyToMessage (org.openkilda.messaging.command.CommandWithReplyToMessage)1 SyncRulesRequest (org.openkilda.messaging.command.switches.SyncRulesRequest)1 SyncRulesResponse (org.openkilda.messaging.info.switches.SyncRulesResponse)1