com.h3c.of.lib.mp

## Class MBodyMutableGroupFeatures

- java.lang.Object
- - com.h3c.of.lib.OpenflowStructure
  - - com.h3c.of.lib.mp.MBodyGroupFeatures
    - - com.h3c.of.lib.mp.MBodyMutableGroupFeatures

- All Implemented Interfaces:
    MultipartBody, MutableObject, MutableStructure, Structure

      public class MBodyMutableGroupFeatures
      extends MBodyGroupFeatures
      implements MutableStructure

  Mutable subclass of `MBodyGroupFeatures`.

- - ### Field Summary

    - ### Fields inherited from class com.h3c.of.lib.OpenflowStructure

      `version`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `MBodyMutableGroupFeatures(ProtocolVersion pv)` Constructs a mutable multipart body GroupFeatures type.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `MBodyMutableGroupFeatures` | `actionsForType(GroupType type, Set<ActionType> actions)` Sets the actions supported for the given group type; since 1.2.
    `MBodyMutableGroupFeatures` | `capabilities(Set<GroupCapability> caps)` Sets the supported group capabilities; since 1.2
    `MBodyMutableGroupFeatures` | `groupTypes(Set<GroupType> types)` Sets the supported group types; since 1.2.
    `MBodyMutableGroupFeatures` | `maxGroupsForType(GroupType type, long max)` Sets the maximum number of groups supported for the given group type; since 1.2.
    `OpenflowStructure` | `toImmutable()` Returns an immutable instance of this structure.
    `String` | `toString()`
    `boolean` | `writable()` Returns true if this mutable object is still writable.

    - ### Methods inherited from class com.h3c.of.lib.mp.MBodyGroupFeatures

      `getActionsForType, getCapabilities, getMaxGroupsForType, getTotalLength, getTypes, toDebugString, toDebugString`

    - ### Methods inherited from class com.h3c.of.lib.OpenflowStructure

      `getVersion, hex, hex, validate`

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

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

    - ### Methods inherited from interface com.h3c.of.lib.Structure

      `getVersion, toDebugString`

    - ### Methods inherited from interface com.h3c.of.lib.mp.MultipartBody

      `validate`

- - ### Constructor Detail

    - #### MBodyMutableGroupFeatures

          public MBodyMutableGroupFeatures(ProtocolVersion pv)

      Constructs a mutable multipart body GroupFeatures type.
      Parameters:
        `pv` - the protocol version

  - ### Method Detail

    - #### toImmutable

          public OpenflowStructure toImmutable()

      Description copied from interface: `MutableStructure`
      Returns an immutable instance of this structure. In essence, converts this structure to be read-only.

      It is expected that the reference to this mutable structure will be dropped. Note that all method calls invoked on a `MutableStructure` after `toImmutable()` has been invoked will result in an `InvalidMutableException` being thrown.

      Specified by:
        `toImmutable` in interface `MutableStructure`
      Returns:
        an immutable instance of this structure.

    - #### writable

          public boolean writable()

      Description copied from interface: `MutableObject`
      Returns true if this mutable object is still writable. That is, the `#toImmutable()` method (defined on a sub-interface) has not yet been invoked.
      Specified by:
        `writable` in interface `MutableObject`
      Returns:
        true if this mutable object is still writable

    - #### toString

          public String toString()

      Overrides:
        `toString` in class `MBodyGroupFeatures`

    - #### groupTypes

          public MBodyMutableGroupFeatures groupTypes(Set<GroupType> types)

      Sets the supported group types; since 1.2.
      Parameters:
        `types` - the set of supported group types
      Returns:
        self, for chaining
      Throws:
        `InvalidMutableException` - if this instance is no longer writable
        `NullPointerException` - if types is null

    - #### capabilities

          public MBodyMutableGroupFeatures capabilities(Set<GroupCapability> caps)

      Sets the supported group capabilities; since 1.2
      Parameters:
        `caps` - the set of supported group capabilities
      Returns:
        this, for chaining
      Throws:
        `InvalidMutableException` - if this instance is no longer writable
        `NullPointerException` - if caps is null

    - #### maxGroupsForType

          public MBodyMutableGroupFeatures maxGroupsForType(GroupType type,
                                                   long max)

      Sets the maximum number of groups supported for the given group type; since 1.2. Note that the maximum must be an unsigned 32-bit value.
      Parameters:
        `type` - the group type
        `max` - the maximum number of groups supported
      Returns:
        this, for chaining
      Throws:
        `InvalidMutableException` - if this instance is no longer writable
        `NullPointerException` - if type is null
        `IllegalArgumentException` - if max is not u32

    - #### actionsForType

          public MBodyMutableGroupFeatures actionsForType(GroupType type,
                                                 Set<ActionType> actions)

      Sets the actions supported for the given group type; since 1.2.
      Parameters:
        `type` - the group type
        `actions` - the actions supported
      Returns:
        this, for chaining
      Throws:
        `InvalidMutableException` - if this instance is no longer writable
        `NullPointerException` - if either parameter is null

Copyright © 2014. All Rights Reserved.