use of org.openkilda.messaging.nbtopology.request.FlowReadRequest in project open-kilda by telstra.
the class FlowServiceImpl method getFlowV2.
/**
* {@inheritDoc}
*/
@Override
public CompletableFuture<FlowResponseV2> getFlowV2(final String id) {
logger.debug("Get flow request for flow {}", id);
FlowReadRequest data = new FlowReadRequest(id);
CommandMessage request = new CommandMessage(data, System.currentTimeMillis(), RequestCorrelationId.getId(), Destination.WFM);
return messagingChannel.sendAndGet(nbworkerTopic, request).thenApply(FlowResponse.class::cast).thenApply(FlowResponse::getPayload).thenApply(flowMapper::toFlowResponseV2);
}
use of org.openkilda.messaging.nbtopology.request.FlowReadRequest in project open-kilda by telstra.
the class FlowServiceImpl method getFlowResponse.
/**
* Reads {@link FlowResponse} flow representation from the Storm.
*
* @return the bidirectional flow.
*/
private CompletableFuture<FlowDto> getFlowResponse(String flowId, String correlationId) {
FlowReadRequest data = new FlowReadRequest(flowId);
CommandMessage request = new CommandMessage(data, System.currentTimeMillis(), correlationId, Destination.WFM);
return messagingChannel.sendAndGet(nbworkerTopic, request).thenApply(FlowResponse.class::cast).thenApply(FlowResponse::getPayload);
}
Aggregations