use of org.openkilda.messaging.nbtopology.request.GetFlowPathRequest in project open-kilda by telstra.
the class FlowServiceImpl method pathFlow.
/**
* {@inheritDoc}
*/
@Override
public CompletableFuture<FlowPathPayload> pathFlow(final String id) {
logger.debug("Flow path request for flow {}", id);
final String correlationId = RequestCorrelationId.getId();
GetFlowPathRequest data = new GetFlowPathRequest(id);
CommandMessage request = new CommandMessage(data, System.currentTimeMillis(), correlationId);
return messagingChannel.sendAndGetChunked(nbworkerTopic, request).thenApply(result -> result.stream().map(GetFlowPathResponse.class::cast).map(GetFlowPathResponse::getPayload).collect(Collectors.toList())).thenApply(respList -> buildFlowPathPayload(respList, id));
}
Aggregations