Search in sources :

Example 1 with PortChangeType

use of org.openkilda.messaging.info.event.PortChangeType in project open-kilda by telstra.

the class IPortImpl method makePorChangetMessage.

public InfoMessage makePorChangetMessage() throws IOException {
    PortChangeType type = isActive ? PortChangeType.UP : PortChangeType.DOWN;
    PortInfoData data = new PortInfoData(sw.getDpid().toString(), number, type);
    return new InfoMessage(data, Instant.now().toEpochMilli(), UUID.randomUUID().toString(), null);
}
Also used : PortChangeType(org.openkilda.messaging.info.event.PortChangeType) InfoMessage(org.openkilda.messaging.info.InfoMessage) PortInfoData(org.openkilda.messaging.info.event.PortInfoData)

Aggregations

InfoMessage (org.openkilda.messaging.info.InfoMessage)1 PortChangeType (org.openkilda.messaging.info.event.PortChangeType)1 PortInfoData (org.openkilda.messaging.info.event.PortInfoData)1