com.h3c.of.json

## Class CodecUtils

- java.lang.Object
- - com.h3c.of.json.CodecUtils

-     public class CodecUtils
      extends Object

  A JSON codec capable of encoding and decoding commonly used open flow data objects.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `CodecUtils()`

  - ### Method Summary

    Methods
    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 long` | `encodeBigPort(BigPortNumber bigPort)` Converts BigPortNumber into long that can be used as a JSON value.
    `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.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### CodecUtils

          public CodecUtils()

  - ### Method Detail

    - #### encodeBigPort

          public static long encodeBigPort(BigPortNumber bigPort)

      Converts BigPortNumber into long that can be used as a JSON value.
      Parameters:
        `bigPort` - the BigPortNumber
      Returns:
        the long representation of BigPortNumber

    - #### decodeBigPort

          public static BigPortNumber decodeBigPort(com.fasterxml.jackson.databind.JsonNode value)

      Converts JsonNode into BigPortNumber object.
      Parameters:
        `value` - the JsonNode
      Returns:
        the BigPortNumber

    - #### encodePort

          public static int encodePort(PortNumber port)

      Converts PortNumber into int that can be used as a JSON value.
      Parameters:
        `port` - the PortNumber
      Returns:
        the int representation of PortNumber

    - #### decodePort

          public static PortNumber decodePort(com.fasterxml.jackson.databind.JsonNode value)

      Converts JsonNode into PortNumber object.
      Parameters:
        `value` - the JsonNode
      Returns:
        the PortNumber

    - #### encodeMac

          public static String encodeMac(MacAddress mac)

      Converts MacAddress into String that can be used as a JSON value.
      Parameters:
        `mac` - the MacAddress
      Returns:
        the String representation of MacAddress

    - #### decodeMac

          public static MacAddress decodeMac(com.fasterxml.jackson.databind.JsonNode value)

      Converts JsonNode into MacAddress object.
      Parameters:
        `value` - the JsonNode
      Returns:
        the MacAddress

    - #### encodeIp

          public static String encodeIp(IpAddress ip)

      Converts IpAddress into String.
      Parameters:
        `ip` - the IpAddress
      Returns:
        the String representation of IpAddress

    - #### decodeIp

          public static IpAddress decodeIp(com.fasterxml.jackson.databind.JsonNode value)

      Converts JsonNode into IpAddress object.
      Parameters:
        `value` - the JsonNode
      Returns:
        the IpAddress

    - #### encodeIpProto

          public static String encodeIpProto(IpProtocol ipProto)

      Converts IpProtocol into String.
      Parameters:
        `ipProto` - the IpProtocol
      Returns:
        the String representation of IpProtocol

    - #### decodeIpProto

          public static IpProtocol decodeIpProto(com.fasterxml.jackson.databind.JsonNode value)

      Converts JsonNode into IpProtocol object.
      Parameters:
        `value` - the JsonNode
      Returns:
        the IpProtocol

    - #### encodeEthType

          public static String encodeEthType(EthernetType ethType)

      Converts EthernetType into String.
      Parameters:
        `ethType` - the EthernetType
      Returns:
        the String representation of EthernetType

    - #### decodeEthType

          public static EthernetType decodeEthType(com.fasterxml.jackson.databind.JsonNode value)

      Converts JsonNode into EthernetType object.
      Parameters:
        `value` - the JsonNode
      Returns:
        the EthernetType

    - #### encodeICMPv4Type

          public static String encodeICMPv4Type(ICMPv4Type type)

      Converts ICMPv4Type into String that can be used as a JSON value.
      Parameters:
        `type` - the ICMPv4Type
      Returns:
        the String representation of ICMPv4Type

    - #### decodeICMPV4Type

          public static ICMPv4Type decodeICMPV4Type(com.fasterxml.jackson.databind.JsonNode value)

      Converts JsonNode into ICMPv4Type object.
      Parameters:
        `value` - the JsonNode
      Returns:
        the ICMPv4Type

    - #### encodeICMPv6Type

          public static String encodeICMPv6Type(ICMPv6Type type)

      Converts ICMPv6Type into String that can be used as a JSON value.
      Parameters:
        `type` - the ICMPv6Type
      Returns:
        the String representation of ICMPv6Type

    - #### decodeICMPV6Type

          public static ICMPv6Type decodeICMPV6Type(com.fasterxml.jackson.databind.JsonNode value)

      Converts JsonNode into ICMPv6Type object.
      Parameters:
        `value` - the JsonNode
      Returns:
        the ICMPv6Type

    - #### encodeFlowModFlag

          public static String encodeFlowModFlag(FlowModFlag flowModFlag)

      Converts FlowModFlag into String that can be used as a JSON value.
      Parameters:
        `flowModFlag` - the FlowModFlag
      Returns:
        the String representation of FlowModFlag

    - #### decodeFlowModFlag

          public static FlowModFlag decodeFlowModFlag(com.fasterxml.jackson.databind.JsonNode value)

      Converts JsonNode into FlowModFlag object.
      Parameters:
        `value` - the JsonNode
      Returns:
        the FlowModFlag

    - #### encodeBufferId

          public static long encodeBufferId(BufferId bufferId)

      Converts BufferId into String that can be used as a JSON value.
      Parameters:
        `bufferId` - the BufferId
      Returns:
        the long representation of BufferId

    - #### decodeBufferId

          public static BufferId decodeBufferId(com.fasterxml.jackson.databind.JsonNode value)

      Converts JsonNode into BufferId object.
      Parameters:
        `value` - the JsonNode
      Returns:
        the BufferId

    - #### encodeGroupId

          public static long encodeGroupId(GroupId groupId)

      Converts GroupId into String that can be used as a JSON value.
      Parameters:
        `groupId` - the GroupId
      Returns:
        the long representation of GroupId

    - #### decodeGroupId

          public static GroupId decodeGroupId(com.fasterxml.jackson.databind.JsonNode value)

      Converts JsonNode into GroupId object.
      Parameters:
        `value` - the JsonNode
      Returns:
        the GroupId

    - #### encodeFlowModCmd

          public static String encodeFlowModCmd(FlowModCommand flowModCmd)

      Converts FlowModCommand into String that can be used as a JSON value.
      Parameters:
        `flowModCmd` - the FlowModCommand
      Returns:
        the String representation of FlowModCommand

    - #### decodeFlowModCmd

          public static FlowModCommand decodeFlowModCmd(com.fasterxml.jackson.databind.JsonNode value)

      Converts JsonNode into FlowModCommand object.
      Parameters:
        `value` - the JsonNode
      Returns:
        the FlowModCommand

    - #### encodeProtocolVersion

          public static String encodeProtocolVersion(ProtocolVersion pv)

      Converts ProtocolVersion into String that can be used as a JSON value.
      Parameters:
        `pv` - the ProtocolVersion
      Returns:
        the String representation of ProtocolVersion

    - #### decodeProtocolVersion

          public static ProtocolVersion decodeProtocolVersion(com.fasterxml.jackson.databind.JsonNode value)

      Converts JsonNode into ProtocolVersion object.
      Parameters:
        `value` - the JsonNode
      Returns:
        the ProtocolVersion

    - #### encodeQueueId

          public static long encodeQueueId(QueueId id)

      Converts QueueId into String that can be used as a JSON value.
      Parameters:
        `id` - the QueueId
      Returns:
        the long representation of QueueId

    - #### decodeQueueId

          public static QueueId decodeQueueId(com.fasterxml.jackson.databind.JsonNode value)

      Converts JsonNode into QueueId object.
      Parameters:
        `value` - the JsonNode
      Returns:
        the QueueId

    - #### encodeTableId

          public static int encodeTableId(TableId id)

      Converts TableId into String that can be used as a JSON value.
      Parameters:
        `id` - the TableId
      Returns:
        the int representation of TableId

    - #### decodeTableId

          public static TableId decodeTableId(com.fasterxml.jackson.databind.JsonNode value)

      Converts JsonNode into TableId object.
      Parameters:
        `value` - the JsonNode
      Returns:
        the TableId

    - #### encodeMeterId

          public static long encodeMeterId(MeterId id)

      Converts MeterId into String that can be used as a JSON value.
      Parameters:
        `id` - the MeterId
      Returns:
        the long representation of MeterId

    - #### decodeMeterId

          public static MeterId decodeMeterId(com.fasterxml.jackson.databind.JsonNode value)

      Converts JsonNode into MeterId object.
      Parameters:
        `value` - the JsonNode
      Returns:
        the MeterId

Copyright © 2014. All Rights Reserved.