Search in sources :

Example 6 with PeriodicPingCommand

use of org.openkilda.messaging.command.flow.PeriodicPingCommand in project open-kilda by telstra.

the class YFlowRerouteHubBolt method sendPeriodicPingNotification.

@Override
public void sendPeriodicPingNotification(String flowId, boolean enabled) {
    PeriodicPingCommand payload = new PeriodicPingCommand(flowId, enabled);
    Message message = new CommandMessage(payload, getCommandContext().getCreateTime(), getCommandContext().getCorrelationId());
    emitWithContext(Stream.HUB_TO_PING_SENDER.name(), getCurrentTuple(), new Values(currentKey, message));
}
Also used : InfoMessage(org.openkilda.messaging.info.InfoMessage) CommandMessage(org.openkilda.messaging.command.CommandMessage) Message(org.openkilda.messaging.Message) Values(org.apache.storm.tuple.Values) PeriodicPingCommand(org.openkilda.messaging.command.flow.PeriodicPingCommand) CommandMessage(org.openkilda.messaging.command.CommandMessage)

Example 7 with PeriodicPingCommand

use of org.openkilda.messaging.command.flow.PeriodicPingCommand in project open-kilda by telstra.

the class FlowPatchBolt method emitPeriodicPingUpdate.

@Override
public void emitPeriodicPingUpdate(String flowId, boolean enabled) {
    CommandMessage command = new CommandMessage(new PeriodicPingCommand(flowId, enabled), System.currentTimeMillis(), getCorrelationId());
    getOutput().emit(StreamType.PING.toString(), getCurrentTuple(), new Values(command, getCommandContext()));
}
Also used : Values(org.apache.storm.tuple.Values) PeriodicPingCommand(org.openkilda.messaging.command.flow.PeriodicPingCommand) CommandMessage(org.openkilda.messaging.command.CommandMessage)

Example 8 with PeriodicPingCommand

use of org.openkilda.messaging.command.flow.PeriodicPingCommand in project open-kilda by telstra.

the class FlowDeleteHubBolt method sendPeriodicPingNotification.

@Override
public void sendPeriodicPingNotification(String flowId, boolean enabled) {
    PeriodicPingCommand payload = new PeriodicPingCommand(flowId, enabled);
    Message message = new CommandMessage(payload, getCommandContext().getCreateTime(), getCommandContext().getCorrelationId());
    emitWithContext(Stream.HUB_TO_PING_SENDER.name(), getCurrentTuple(), new Values(currentKey, message));
}
Also used : InfoMessage(org.openkilda.messaging.info.InfoMessage) Message(org.openkilda.messaging.Message) CommandMessage(org.openkilda.messaging.command.CommandMessage) Values(org.apache.storm.tuple.Values) PeriodicPingCommand(org.openkilda.messaging.command.flow.PeriodicPingCommand) CommandMessage(org.openkilda.messaging.command.CommandMessage)

Example 9 with PeriodicPingCommand

use of org.openkilda.messaging.command.flow.PeriodicPingCommand in project open-kilda by telstra.

the class FlowRerouteHubBolt method sendPeriodicPingNotification.

@Override
public void sendPeriodicPingNotification(String flowId, boolean enabled) {
    PeriodicPingCommand payload = new PeriodicPingCommand(flowId, enabled);
    Message message = new CommandMessage(payload, getCommandContext().getCreateTime(), getCommandContext().getCorrelationId());
    emitWithContext(Stream.HUB_TO_PING_SENDER.name(), getCurrentTuple(), new Values(currentKey, message));
}
Also used : InfoMessage(org.openkilda.messaging.info.InfoMessage) Message(org.openkilda.messaging.Message) CommandMessage(org.openkilda.messaging.command.CommandMessage) Values(org.apache.storm.tuple.Values) PeriodicPingCommand(org.openkilda.messaging.command.flow.PeriodicPingCommand) CommandMessage(org.openkilda.messaging.command.CommandMessage)

Example 10 with PeriodicPingCommand

use of org.openkilda.messaging.command.flow.PeriodicPingCommand in project open-kilda by telstra.

the class FlowCreateHubBolt method sendPeriodicPingNotification.

@Override
public void sendPeriodicPingNotification(String flowId, boolean enabled) {
    PeriodicPingCommand payload = new PeriodicPingCommand(flowId, enabled);
    Message message = new CommandMessage(payload, getCommandContext().getCreateTime(), getCommandContext().getCorrelationId());
    emitWithContext(Stream.HUB_TO_PING_SENDER.name(), getCurrentTuple(), new Values(currentKey, message));
}
Also used : InfoMessage(org.openkilda.messaging.info.InfoMessage) CommandMessage(org.openkilda.messaging.command.CommandMessage) Message(org.openkilda.messaging.Message) Values(org.apache.storm.tuple.Values) PeriodicPingCommand(org.openkilda.messaging.command.flow.PeriodicPingCommand) CommandMessage(org.openkilda.messaging.command.CommandMessage)

Aggregations

Values (org.apache.storm.tuple.Values)10 CommandMessage (org.openkilda.messaging.command.CommandMessage)10 PeriodicPingCommand (org.openkilda.messaging.command.flow.PeriodicPingCommand)10 Message (org.openkilda.messaging.Message)9 InfoMessage (org.openkilda.messaging.info.InfoMessage)9 ErrorMessage (org.openkilda.messaging.error.ErrorMessage)1