![]() |
Open Kilda Java Documentation
|
Static Public Member Functions | |
static String | createSwitchInfoMessage (String switchId, String state) |
static String | createPortInfoMessage (String switchId, String portId, String state) |
static String | createInfoMessage (boolean isSwitch, String switchId, String portId, String state) |
static String | createSwitchDataMessage (String state, String switchId) |
static String | createPortDataMessage (String state, String switchId, String portId) |
static String | createDataMessage (String type, String state, String switchId, String portId) |
static Map< String, ?> | fromJson (String json) throws IOException |
static String | toJson (Map< String, ?> map) throws IOException |
static Map< String, ?> | getData (String json) throws IOException |
static String | createIslFail (SwitchId switchId, int portId, String correlationId) throws IOException |
static String | createIslDiscovery (SwitchId switchId, int portId, String correlationId) throws IOException |
Static Public Attributes | |
static final String | FIELD_SWITCH_ID = "switch_id" |
static final String | FIELD_PORT_ID = "port_no" |
static final String | FIELD_STATE = "state" |
static final String | SWITCH_UP = "ACTIVATED" |
static final String | SWITCH_DOWN = "DEACTIVATED" |
static final String | PORT_UP = "UP" |
static final String | PORT_ADD = "ADD" |
static final String | PORT_DOWN = "DOWN" |
static final String | LINK_UP = "DISCOVERED" |
static final String | LINK_DOWN = "FAILED" |
static final String | MT_SWITCH = "org.openkilda.messaging.info.event.SwitchInfoData" |
static final String | MT_PORT = "org.openkilda.messaging.info.event.PortInfoData" |
OfeMessageUtils - A utility class that will help with the messages on kilda.speaker and speaker.**.*
Example OpenFlow Messages: { "clazz": "org.openkilda.messaging.info.InfoMessage", "timestamp": 1489980143, "payload": { "clazz": "org.openkilda.messaging.info.event.SwitchInfoData", "switch_id": "0x0000000000000001", "state": "ACTIVATED | ADDED | CHANGE | DEACTIVATED | REMOVED" } }
{ "clazz": "org.openkilda.messaging.info.InfoMessage", "timestamp": 1489980143, "payload": { "clazz": "org.openkilda.messaging.info.event.PortInfoData", "switch_id": "0x0000000000000001", "state": "UP | DOWN | .. " "port_no": LONG "max_capacity": LONG } }
{"clazz": "org.openkilda.messaging.info.InfoMessage", "payload": { "clazz": "org.openkilda.messaging.info.event.SwitchInfoData", "switch_id": "0x0000000000000001", "state": "ACTIVATED"}}
Definition at line 71 of file OfeMessageUtils.java.
|
static |
Return the {"payload":{}} portion of a Kilda message type.
Definition at line 154 of file OfeMessageUtils.java.
|
static |
Return info message.
isSwitch | it is either a switch or port at this stage. |
switchId | switch id. |
portId | port id. |
state | state. |
Definition at line 130 of file OfeMessageUtils.java.
|
static |
Return a JSON string that can be used to for link event.
Definition at line 215 of file OfeMessageUtils.java.
|
static |
Return ISL discovery failure message.
switchId | switch id. |
portId | port id. |
correlationId | correlation id. |
IOException | error writing message as string. |
Definition at line 199 of file OfeMessageUtils.java.
|
static |
Definition at line 145 of file OfeMessageUtils.java.
|
static |
Return port info message.
switchId | switch id. |
portId | port id. |
state | - ADD | OTHER_UPDATE | DELETE | UP | DOWN |
Definition at line 117 of file OfeMessageUtils.java.
|
static |
Definition at line 141 of file OfeMessageUtils.java.
|
static |
Return switch info message.
switchId | switch id. |
state | - ACTIVATED | ADDED | CHANGE | DEACTIVATED | REMOVED |
Definition at line 105 of file OfeMessageUtils.java.
|
static |
Definition at line 167 of file OfeMessageUtils.java.
|
static |
Return data from json.
json | JSON. |
IOException | error getting root from json. |
Definition at line 182 of file OfeMessageUtils.java.
|
static |
Definition at line 171 of file OfeMessageUtils.java.
|
static |
Definition at line 74 of file OfeMessageUtils.java.
|
static |
Definition at line 75 of file OfeMessageUtils.java.
|
static |
Definition at line 73 of file OfeMessageUtils.java.
|
static |
Definition at line 83 of file OfeMessageUtils.java.
|
static |
Definition at line 82 of file OfeMessageUtils.java.
|
static |
Definition at line 87 of file OfeMessageUtils.java.
|
static |
Definition at line 86 of file OfeMessageUtils.java.
|
static |
Definition at line 80 of file OfeMessageUtils.java.
|
static |
Definition at line 81 of file OfeMessageUtils.java.
|
static |
Definition at line 79 of file OfeMessageUtils.java.
|
static |
Definition at line 78 of file OfeMessageUtils.java.
|
static |
Definition at line 77 of file OfeMessageUtils.java.