com.h3c.of.lib.msg

## Enum ControllerRole

- java.lang.Object
- - java.lang.Enum<ControllerRole>
  - - com.h3c.of.lib.msg.ControllerRole

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

      public enum ControllerRole
      extends Enum<ControllerRole>
      implements OfpCodeBasedEnum

  Designates the role of a controller; Since 1.2.

- - ### Enum Constant Summary

    Enum Constants
    Enum Constant and Description
    `EQUAL` Default role, full access; Since 1.2.
    `MASTER` Full access, at most one master; Since 1.2.
    `NO_CHANGE` Don't change the current role; Since 1.2.
    `SLAVE` Read-only access; Since 1.2.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `int` | `getCode(ProtocolVersion pv)` Returns the code for the constant, under the given protocol version.
    `static ControllerRole` | `valueOf(String name)` Returns the enum constant of this type with the specified name.
    `static ControllerRole[]` | `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

    - #### NO_CHANGE

          public static final ControllerRole NO_CHANGE

      Don't change the current role; Since 1.2.

    - #### EQUAL

          public static final ControllerRole EQUAL

      Default role, full access; Since 1.2.

    - #### MASTER

          public static final ControllerRole MASTER

      Full access, at most one master; Since 1.2.

    - #### SLAVE

          public static final ControllerRole SLAVE

      Read-only access; Since 1.2.

  - ### Method Detail

    - #### values

          public static ControllerRole[] 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 (ControllerRole c : ControllerRole.values())
              System.out.println(c);

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

    - #### valueOf

          public static ControllerRole 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

Copyright © 2014. All Rights Reserved.