Search in sources :

Example 1 with FeatureTogglesResponse

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

the class FeatureTogglesServiceImpl method getFeatureTogglesState.

@Override
public FeatureTogglePayload getFeatureTogglesState() {
    String correlationId = UUID.randomUUID().toString();
    FeatureToggleStateRequest teRequest = new FeatureToggleStateRequest();
    CommandMessage requestMessage = new CommandMessage(teRequest, System.currentTimeMillis(), correlationId, Destination.TOPOLOGY_ENGINE);
    messageProducer.send(topoEngTopic, requestMessage);
    Message result = messageConsumer.poll(requestMessage.getCorrelationId());
    FeatureTogglesResponse response = (FeatureTogglesResponse) validateInfoMessage(requestMessage, result, correlationId);
    return mapper.toDto(response);
}
Also used : Message(org.openkilda.messaging.Message) CommandMessage(org.openkilda.messaging.command.CommandMessage) FeatureTogglesResponse(org.openkilda.messaging.info.system.FeatureTogglesResponse) FeatureToggleStateRequest(org.openkilda.messaging.command.system.FeatureToggleStateRequest) CommandMessage(org.openkilda.messaging.command.CommandMessage)

Aggregations

Message (org.openkilda.messaging.Message)1 CommandMessage (org.openkilda.messaging.command.CommandMessage)1 FeatureToggleStateRequest (org.openkilda.messaging.command.system.FeatureToggleStateRequest)1 FeatureTogglesResponse (org.openkilda.messaging.info.system.FeatureTogglesResponse)1