Search in sources :

Example 1 with GrpcBaseRequest

use of org.openkilda.messaging.command.grpc.GrpcBaseRequest in project open-kilda by telstra.

the class SpeakerWorkerBolt method onHubRequest.

@Override
protected void onHubRequest(Tuple input) throws PipelineException {
    String key = input.getStringByField(MessageKafkaTranslator.FIELD_ID_KEY);
    CommandData command = pullValue(input, MessageKafkaTranslator.FIELD_ID_PAYLOAD, CommandData.class);
    if (command instanceof GrpcBaseRequest) {
        service.sendGrpcCommand(key, command);
    } else {
        service.sendFloodlightCommand(key, command);
    }
}
Also used : GrpcBaseRequest(org.openkilda.messaging.command.grpc.GrpcBaseRequest) CommandData(org.openkilda.messaging.command.CommandData)

Aggregations

CommandData (org.openkilda.messaging.command.CommandData)1 GrpcBaseRequest (org.openkilda.messaging.command.grpc.GrpcBaseRequest)1