use of org.openkilda.server42.control.messaging.flowrtt.ActivateFlowMonitoringInfoData in project open-kilda by telstra.
the class Router method handleInfoMessage.
private void handleInfoMessage(Tuple input, InfoData payload) throws PipelineException {
if (payload instanceof ActivateFlowMonitoringInfoData) {
ActivateFlowMonitoringInfoData data = (ActivateFlowMonitoringInfoData) payload;
emit(STREAM_FLOW_ID, input, makeTuple(new ActivateFlowMonitoringCommand(data, true)));
emit(STREAM_FLOW_ID, input, makeTuple(new ActivateFlowMonitoringCommand(data, false)));
} else if (payload instanceof DeactivateFlowMonitoringInfoData) {
DeactivateFlowMonitoringInfoData data = (DeactivateFlowMonitoringInfoData) payload;
for (SwitchId switchId : data.getSwitchIds()) {
emit(STREAM_FLOW_ID, input, makeTuple(new DeactivateFlowMonitoringCommand(switchId, data.getFlowId(), true)));
emit(STREAM_FLOW_ID, input, makeTuple(new DeactivateFlowMonitoringCommand(switchId, data.getFlowId(), false)));
}
} else if (payload instanceof ActivateFlowMonitoringOnSwitchInfoData) {
ActivateFlowMonitoringOnSwitchInfoData data = (ActivateFlowMonitoringOnSwitchInfoData) payload;
activateFlowMonitoringOnSwitch(data.getSwitchId());
} else if (payload instanceof DeactivateFlowMonitoringOnSwitchInfoData) {
DeactivateFlowMonitoringOnSwitchInfoData data = (DeactivateFlowMonitoringOnSwitchInfoData) payload;
deactivateFlowMonitoringOnSwitch(data.getSwitchId());
} else if (payload instanceof ActivateIslMonitoringOnSwitchInfoData) {
ActivateIslMonitoringOnSwitchInfoData data = (ActivateIslMonitoringOnSwitchInfoData) payload;
activateIslMonitoringOnSwitch(data.getSwitchId());
} else if (payload instanceof DeactivateIslMonitoringOnSwitchInfoData) {
DeactivateIslMonitoringOnSwitchInfoData data = (DeactivateIslMonitoringOnSwitchInfoData) payload;
deactivateIslMonitoringOnSwitch(data.getSwitchId());
} else if (payload instanceof FeatureTogglesUpdate) {
FeatureTogglesUpdate data = (FeatureTogglesUpdate) payload;
this.service.handleFlowRttFeatureToggle(data.getToggles().getServer42FlowRtt());
this.service.handleIslRttFeatureToggle(data.getToggles().getServer42IslRtt());
} else {
log.error("Do not proxy flow message - unexpected message payload \"{}\"", payload.getClass());
}
}
Aggregations