Search in sources :

Example 1 with Command

use of org.openkilda.floodlight.command.Command in project open-kilda by telstra.

the class RecordHandler method dispatch.

private boolean dispatch(CommandContext commandContext, CommandMessage message) {
    CommandData payload = message.getData();
    for (CommandDispatcher<?> entry : dispatchers) {
        Optional<Command> command = entry.dispatch(commandContext, payload);
        if (!command.isPresent()) {
            continue;
        }
        commandProcessor.process(command.get());
        return true;
    }
    return false;
}
Also used : GroupModifyCommand(org.openkilda.floodlight.command.group.GroupModifyCommand) Command(org.openkilda.floodlight.command.Command) TransitFlowLoopSegmentInstallCommand(org.openkilda.floodlight.command.flow.transit.TransitFlowLoopSegmentInstallCommand) SpeakerCommand(org.openkilda.floodlight.command.SpeakerCommand) InstallIslDefaultRulesCommand(org.openkilda.messaging.payload.switches.InstallIslDefaultRulesCommand) GroupInstallCommand(org.openkilda.floodlight.command.group.GroupInstallCommand) OneSwitchFlowInstallCommand(org.openkilda.floodlight.command.flow.ingress.OneSwitchFlowInstallCommand) OneSwitchMirrorFlowInstallCommand(org.openkilda.floodlight.command.flow.ingress.OneSwitchMirrorFlowInstallCommand) RemoveIslDefaultRulesCommand(org.openkilda.messaging.payload.switches.RemoveIslDefaultRulesCommand) EgressFlowSegmentInstallCommand(org.openkilda.floodlight.command.flow.egress.EgressFlowSegmentInstallCommand) MeterModifyCommand(org.openkilda.floodlight.command.meter.MeterModifyCommand) IngressMirrorFlowSegmentInstallCommand(org.openkilda.floodlight.command.flow.ingress.IngressMirrorFlowSegmentInstallCommand) EgressMirrorFlowSegmentInstallCommand(org.openkilda.floodlight.command.flow.egress.EgressMirrorFlowSegmentInstallCommand) GroupRemoveCommand(org.openkilda.floodlight.command.group.GroupRemoveCommand) FlowSegmentWrapperCommand(org.openkilda.floodlight.command.flow.FlowSegmentWrapperCommand) IngressFlowLoopSegmentInstallCommand(org.openkilda.floodlight.command.flow.ingress.IngressFlowLoopSegmentInstallCommand) IngressFlowSegmentInstallCommand(org.openkilda.floodlight.command.flow.ingress.IngressFlowSegmentInstallCommand) IngressServer42FlowInstallCommand(org.openkilda.floodlight.command.flow.ingress.IngressServer42FlowInstallCommand) TransitFlowSegmentInstallCommand(org.openkilda.floodlight.command.flow.transit.TransitFlowSegmentInstallCommand) NetworkCommandData(org.openkilda.messaging.command.discovery.NetworkCommandData) DiscoverIslCommandData(org.openkilda.messaging.command.discovery.DiscoverIslCommandData) PortsCommandData(org.openkilda.messaging.command.discovery.PortsCommandData) DiscoverPathCommandData(org.openkilda.messaging.command.discovery.DiscoverPathCommandData) CommandData(org.openkilda.messaging.command.CommandData)

Aggregations

Command (org.openkilda.floodlight.command.Command)1 SpeakerCommand (org.openkilda.floodlight.command.SpeakerCommand)1 FlowSegmentWrapperCommand (org.openkilda.floodlight.command.flow.FlowSegmentWrapperCommand)1 EgressFlowSegmentInstallCommand (org.openkilda.floodlight.command.flow.egress.EgressFlowSegmentInstallCommand)1 EgressMirrorFlowSegmentInstallCommand (org.openkilda.floodlight.command.flow.egress.EgressMirrorFlowSegmentInstallCommand)1 IngressFlowLoopSegmentInstallCommand (org.openkilda.floodlight.command.flow.ingress.IngressFlowLoopSegmentInstallCommand)1 IngressFlowSegmentInstallCommand (org.openkilda.floodlight.command.flow.ingress.IngressFlowSegmentInstallCommand)1 IngressMirrorFlowSegmentInstallCommand (org.openkilda.floodlight.command.flow.ingress.IngressMirrorFlowSegmentInstallCommand)1 IngressServer42FlowInstallCommand (org.openkilda.floodlight.command.flow.ingress.IngressServer42FlowInstallCommand)1 OneSwitchFlowInstallCommand (org.openkilda.floodlight.command.flow.ingress.OneSwitchFlowInstallCommand)1 OneSwitchMirrorFlowInstallCommand (org.openkilda.floodlight.command.flow.ingress.OneSwitchMirrorFlowInstallCommand)1 TransitFlowLoopSegmentInstallCommand (org.openkilda.floodlight.command.flow.transit.TransitFlowLoopSegmentInstallCommand)1 TransitFlowSegmentInstallCommand (org.openkilda.floodlight.command.flow.transit.TransitFlowSegmentInstallCommand)1 GroupInstallCommand (org.openkilda.floodlight.command.group.GroupInstallCommand)1 GroupModifyCommand (org.openkilda.floodlight.command.group.GroupModifyCommand)1 GroupRemoveCommand (org.openkilda.floodlight.command.group.GroupRemoveCommand)1 MeterModifyCommand (org.openkilda.floodlight.command.meter.MeterModifyCommand)1 CommandData (org.openkilda.messaging.command.CommandData)1 DiscoverIslCommandData (org.openkilda.messaging.command.discovery.DiscoverIslCommandData)1 DiscoverPathCommandData (org.openkilda.messaging.command.discovery.DiscoverPathCommandData)1