use of org.openkilda.messaging.command.grpc.GetSwitchInfoRequest in project open-kilda by telstra.
the class MessageProcessor method handleCommandMessage.
private void handleCommandMessage(CommandMessage command, String key) {
CommandData data = command.getData();
String correlationId = command.getCorrelationId();
CompletableFuture<Response> result;
if (data instanceof CreateLogicalPortRequest) {
result = handleCreateLogicalPortRequest((CreateLogicalPortRequest) data);
} else if (data instanceof DumpLogicalPortsRequest) {
result = handleDumpLogicalPortsRequest((DumpLogicalPortsRequest) data);
} else if (data instanceof GetSwitchInfoRequest) {
result = handleGetSwitchInfoRequest((GetSwitchInfoRequest) data);
} else if (data instanceof GetPacketInOutStatsRequest) {
result = handleGetPacketInOutStatsRequest((GetPacketInOutStatsRequest) data);
} else if (data instanceof DeleteLogicalPortRequest) {
result = handleDeleteLogicalPortRequest((DeleteLogicalPortRequest) data);
} else {
result = unhandledMessage(command);
}
result.thenAccept(response -> sendResponse(response, correlationId, key));
}
Aggregations