com.h3c.of.lib.err

## Enum ErrorType

- java.lang.Object
- - java.lang.Enum<ErrorType>
  - - com.h3c.of.lib.err.ErrorType

- All Implemented Interfaces:
    OfpCodeBasedEnum, OfpEnum, Serializable, Comparable<ErrorType>

      public enum ErrorType
      extends Enum<ErrorType>
      implements OfpCodeBasedEnum

  Designates the type of error; Since 1.0.

- - ### Enum Constant Summary

    Enum Constants
    Enum Constant and Description
    `BAD_ACTION` Error in action description; Since 1.0.
    `BAD_INSTRUCTION` Error in instruction list; Since 1.1.
    `BAD_MATCH` Error in match; Since 1.1.
    `BAD_REQUEST` Request was not understood; Since 1.0.
    `EXPERIMENTER` Experimenter error messages; Since 1.2.
    `FLOW_MOD_FAILED` Problem modifying flow entry; Since 1.0.
    `GROUP_MOD_FAILED` Problem modifying group entry; Since 1.1.
    `HELLO_FAILED` Hello protocol failed; Since 1.0.
    `METER_MOD_FAILED` Error in meter; Since 1.3.
    `PORT_MOD_FAILED` Port mod request failed; Since 1.0.
    `QUEUE_OP_FAILED` Queue operation failed; Since 1.0.
    `ROLE_REQUEST_FAILED` Controller Role request failed; Since 1.2.
    `SWITCH_CONFIG_FAILED` Switch config request failed; Since 1.1.
    `TABLE_FEATURES_FAILED` Setting table features failed; Since 1.3.
    `TABLE_MOD_FAILED` Table mod request failed; Since 1.1.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `static ErrorType` | `decode(int code, ProtocolVersion pv)` Decodes the error type code and returns the corresponding constant.
    `int` | `getCode(ProtocolVersion pv)` Returns the code for the constant, under the given protocol version.
    `static ErrorType` | `valueOf(String name)` Returns the enum constant of this type with the specified name.
    `static ErrorType[]` | `values()` Returns an array containing the constants of this enum type, in the order they are declared.

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

      `clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf`

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

      `getClass, notify, notifyAll, wait, wait, wait`

- - ### Enum Constant Detail

    - #### HELLO_FAILED

          public static final ErrorType HELLO_FAILED

      Hello protocol failed; Since 1.0.

    - #### BAD_REQUEST

          public static final ErrorType BAD_REQUEST

      Request was not understood; Since 1.0.

    - #### BAD_ACTION

          public static final ErrorType BAD_ACTION

      Error in action description; Since 1.0.

    - #### BAD_INSTRUCTION

          public static final ErrorType BAD_INSTRUCTION

      Error in instruction list; Since 1.1.

    - #### BAD_MATCH

          public static final ErrorType BAD_MATCH

      Error in match; Since 1.1.

    - #### FLOW_MOD_FAILED

          public static final ErrorType FLOW_MOD_FAILED

      Problem modifying flow entry; Since 1.0.

    - #### GROUP_MOD_FAILED

          public static final ErrorType GROUP_MOD_FAILED

      Problem modifying group entry; Since 1.1.

    - #### PORT_MOD_FAILED

          public static final ErrorType PORT_MOD_FAILED

      Port mod request failed; Since 1.0.

    - #### TABLE_MOD_FAILED

          public static final ErrorType TABLE_MOD_FAILED

      Table mod request failed; Since 1.1.

    - #### QUEUE_OP_FAILED

          public static final ErrorType QUEUE_OP_FAILED

      Queue operation failed; Since 1.0.

    - #### SWITCH_CONFIG_FAILED

          public static final ErrorType SWITCH_CONFIG_FAILED

      Switch config request failed; Since 1.1.

    - #### ROLE_REQUEST_FAILED

          public static final ErrorType ROLE_REQUEST_FAILED

      Controller Role request failed; Since 1.2.

    - #### METER_MOD_FAILED

          public static final ErrorType METER_MOD_FAILED

      Error in meter; Since 1.3.

    - #### TABLE_FEATURES_FAILED

          public static final ErrorType TABLE_FEATURES_FAILED

      Setting table features failed; Since 1.3.

    - #### EXPERIMENTER

          public static final ErrorType EXPERIMENTER

      Experimenter error messages; Since 1.2.

  - ### Method Detail

    - #### values

          public static ErrorType[] values()

      Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:

          for (ErrorType c : ErrorType.values())
              System.out.println(c);

      Returns:
        an array containing the constants of this enum type, in the order they are declared

    - #### valueOf

          public static ErrorType valueOf(String name)

      Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
      Parameters:
        `name` - the name of the enum constant to be returned.
      Returns:
        the enum constant with the specified name
      Throws:
        `IllegalArgumentException` - if this enum type has no constant with the specified name
        `NullPointerException` - if the argument is null

    - #### getCode

          public int getCode(ProtocolVersion pv)

      Description copied from interface: `OfpCodeBasedEnum`
      Returns the code for the constant, under the given protocol version.
      Specified by:
        `getCode` in interface `OfpCodeBasedEnum`
      Parameters:
        `pv` - the protocol version
      Returns:
        the code for the constant

    - #### decode

          public static ErrorType decode(int code,
                         ProtocolVersion pv)
                                  throws DecodeException

      Decodes the error type code and returns the corresponding constant. If the code is not recognized, an exception is thrown.
      Parameters:
        `code` - the encoded type
        `pv` - the protocol version
      Returns:
        the error type
      Throws:
        `DecodeException` - if the code is not recognized
        `VersionMismatchException` - if the error type is not supported in the given version

Copyright © 2014. All Rights Reserved.