Search in sources :

Example 1 with FlowConnectedDeviceRequest

use of org.openkilda.messaging.nbtopology.request.FlowConnectedDeviceRequest in project open-kilda by telstra.

the class FlowServiceImpl method getFlowConnectedDevices.

@Override
public CompletableFuture<FlowConnectedDevicesResponse> getFlowConnectedDevices(String flowId, Instant since) {
    logger.info("Get connected devices for flow {} since {}", flowId, since);
    FlowConnectedDeviceRequest request = new FlowConnectedDeviceRequest(flowId, since);
    CommandMessage message = new CommandMessage(request, System.currentTimeMillis(), RequestCorrelationId.getId(), Destination.WFM);
    return messagingChannel.sendAndGet(nbworkerTopic, message).thenApply(org.openkilda.messaging.nbtopology.response.FlowConnectedDevicesResponse.class::cast).thenApply(connectedDeviceMapper::toResponse);
}
Also used : FlowConnectedDeviceRequest(org.openkilda.messaging.nbtopology.request.FlowConnectedDeviceRequest) CommandMessage(org.openkilda.messaging.command.CommandMessage)

Aggregations

CommandMessage (org.openkilda.messaging.command.CommandMessage)1 FlowConnectedDeviceRequest (org.openkilda.messaging.nbtopology.request.FlowConnectedDeviceRequest)1