public class CodecUtils extends Object
Constructor and Description |
---|
CodecUtils() |
Modifier and Type | Method and Description |
---|---|
static BigPortNumber |
decodeBigPort(com.fasterxml.jackson.databind.JsonNode value)
Converts JsonNode into BigPortNumber object.
|
static BufferId |
decodeBufferId(com.fasterxml.jackson.databind.JsonNode value)
Converts JsonNode into BufferId object.
|
static EthernetType |
decodeEthType(com.fasterxml.jackson.databind.JsonNode value)
Converts JsonNode into EthernetType object.
|
static FlowModCommand |
decodeFlowModCmd(com.fasterxml.jackson.databind.JsonNode value)
Converts JsonNode into FlowModCommand object.
|
static FlowModFlag |
decodeFlowModFlag(com.fasterxml.jackson.databind.JsonNode value)
Converts JsonNode into FlowModFlag object.
|
static GroupId |
decodeGroupId(com.fasterxml.jackson.databind.JsonNode value)
Converts JsonNode into GroupId object.
|
static ICMPv4Type |
decodeICMPV4Type(com.fasterxml.jackson.databind.JsonNode value)
Converts JsonNode into ICMPv4Type object.
|
static ICMPv6Type |
decodeICMPV6Type(com.fasterxml.jackson.databind.JsonNode value)
Converts JsonNode into ICMPv6Type object.
|
static IpAddress |
decodeIp(com.fasterxml.jackson.databind.JsonNode value)
Converts JsonNode into IpAddress object.
|
static IpProtocol |
decodeIpProto(com.fasterxml.jackson.databind.JsonNode value)
Converts JsonNode into IpProtocol object.
|
static MacAddress |
decodeMac(com.fasterxml.jackson.databind.JsonNode value)
Converts JsonNode into MacAddress object.
|
static MeterId |
decodeMeterId(com.fasterxml.jackson.databind.JsonNode value)
Converts JsonNode into MeterId object.
|
static PortNumber |
decodePort(com.fasterxml.jackson.databind.JsonNode value)
Converts JsonNode into PortNumber object.
|
static ProtocolVersion |
decodeProtocolVersion(com.fasterxml.jackson.databind.JsonNode value)
Converts JsonNode into ProtocolVersion object.
|
static QueueId |
decodeQueueId(com.fasterxml.jackson.databind.JsonNode value)
Converts JsonNode into QueueId object.
|
static TableId |
decodeTableId(com.fasterxml.jackson.databind.JsonNode value)
Converts JsonNode into TableId object.
|
static com.fasterxml.jackson.databind.node.ObjectNode |
encodeBigPort(com.fasterxml.jackson.databind.node.ObjectNode node,
String key,
BigPortNumber bpn,
ProtocolVersion pv)
Encodes the given big port number (for the given protocol version) as
either an integer or a string (for reserved logical ports), and adds
that value to the given JSON node with the given key.
|
static long |
encodeBufferId(BufferId bufferId)
Converts BufferId into String that can be used as a JSON value.
|
static String |
encodeEthType(EthernetType ethType)
Converts EthernetType into String.
|
static String |
encodeFlowModCmd(FlowModCommand flowModCmd)
Converts FlowModCommand into String that can be used as a JSON value.
|
static String |
encodeFlowModFlag(FlowModFlag flowModFlag)
Converts FlowModFlag into String that can be used as a JSON value.
|
static long |
encodeGroupId(GroupId groupId)
Converts GroupId into String that can be used as a JSON value.
|
static String |
encodeICMPv4Type(ICMPv4Type type)
Converts ICMPv4Type into String that can be used as a JSON value.
|
static String |
encodeICMPv6Type(ICMPv6Type type)
Converts ICMPv6Type into String that can be used as a JSON value.
|
static String |
encodeIp(IpAddress ip)
Converts IpAddress into String.
|
static String |
encodeIpProto(IpProtocol ipProto)
Converts IpProtocol into String.
|
static String |
encodeMac(MacAddress mac)
Converts MacAddress into String that can be used as a JSON value.
|
static long |
encodeMeterId(MeterId id)
Converts MeterId into String that can be used as a JSON value.
|
static int |
encodePort(PortNumber port)
Converts PortNumber into int that can be used as a JSON value.
|
static String |
encodeProtocolVersion(ProtocolVersion pv)
Converts ProtocolVersion into String that can be used as a JSON value.
|
static long |
encodeQueueId(QueueId id)
Converts QueueId into String that can be used as a JSON value.
|
static int |
encodeTableId(TableId id)
Converts TableId into String that can be used as a JSON value.
|
public static com.fasterxml.jackson.databind.node.ObjectNode encodeBigPort(com.fasterxml.jackson.databind.node.ObjectNode node, String key, BigPortNumber bpn, ProtocolVersion pv)
node
- the JSON nodekey
- the JSON property keybpn
- the big port numberpv
- the protocol versionpublic static BigPortNumber decodeBigPort(com.fasterxml.jackson.databind.JsonNode value)
value
- the JsonNodepublic static int encodePort(PortNumber port)
port
- the PortNumberpublic static PortNumber decodePort(com.fasterxml.jackson.databind.JsonNode value)
value
- the JsonNodepublic static String encodeMac(MacAddress mac)
mac
- the MacAddresspublic static MacAddress decodeMac(com.fasterxml.jackson.databind.JsonNode value)
value
- the JsonNodepublic static String encodeIp(IpAddress ip)
ip
- the IpAddresspublic static IpAddress decodeIp(com.fasterxml.jackson.databind.JsonNode value)
value
- the JsonNodepublic static String encodeIpProto(IpProtocol ipProto)
ipProto
- the IpProtocolpublic static IpProtocol decodeIpProto(com.fasterxml.jackson.databind.JsonNode value)
value
- the JsonNodepublic static String encodeEthType(EthernetType ethType)
ethType
- the EthernetTypepublic static EthernetType decodeEthType(com.fasterxml.jackson.databind.JsonNode value)
value
- the JsonNodepublic static String encodeICMPv4Type(ICMPv4Type type)
type
- the ICMPv4Typepublic static ICMPv4Type decodeICMPV4Type(com.fasterxml.jackson.databind.JsonNode value)
value
- the JsonNodepublic static String encodeICMPv6Type(ICMPv6Type type)
type
- the ICMPv6Typepublic static ICMPv6Type decodeICMPV6Type(com.fasterxml.jackson.databind.JsonNode value)
value
- the JsonNodepublic static String encodeFlowModFlag(FlowModFlag flowModFlag)
flowModFlag
- the FlowModFlagpublic static FlowModFlag decodeFlowModFlag(com.fasterxml.jackson.databind.JsonNode value)
value
- the JsonNodepublic static long encodeBufferId(BufferId bufferId)
bufferId
- the BufferIdpublic static BufferId decodeBufferId(com.fasterxml.jackson.databind.JsonNode value)
value
- the JsonNodepublic static long encodeGroupId(GroupId groupId)
groupId
- the GroupIdpublic static GroupId decodeGroupId(com.fasterxml.jackson.databind.JsonNode value)
value
- the JsonNodepublic static String encodeFlowModCmd(FlowModCommand flowModCmd)
flowModCmd
- the FlowModCommandpublic static FlowModCommand decodeFlowModCmd(com.fasterxml.jackson.databind.JsonNode value)
value
- the JsonNodepublic static String encodeProtocolVersion(ProtocolVersion pv)
pv
- the ProtocolVersionpublic static ProtocolVersion decodeProtocolVersion(com.fasterxml.jackson.databind.JsonNode value)
value
- the JsonNodepublic static long encodeQueueId(QueueId id)
id
- the QueueIdpublic static QueueId decodeQueueId(com.fasterxml.jackson.databind.JsonNode value)
value
- the JsonNodepublic static int encodeTableId(TableId id)
id
- the TableIdpublic static TableId decodeTableId(com.fasterxml.jackson.databind.JsonNode value)
value
- the JsonNodepublic static long encodeMeterId(MeterId id)
id
- the MeterIdpublic static MeterId decodeMeterId(com.fasterxml.jackson.databind.JsonNode value)
value
- the JsonNodeCopyright © 2015. All Rights Reserved.