com.h3c.of.lib.mp

## Class MBodyMeterConfig

- java.lang.Object
- - com.h3c.of.lib.OpenflowStructure
  - - com.h3c.of.lib.mp.MBodyMeterConfig

- All Implemented Interfaces:
    MultipartBody, Structure
  Direct Known Subclasses:
    MBodyMutableMeterConfig

      public class MBodyMeterConfig
      extends OpenflowStructure
      implements MultipartBody

  Represents a meter config element; part of a reply to a meter configuration request multipart message; Since 1.3.

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `static class` | `MBodyMeterConfig.Array` Represents an array of meter config elements.
    `static class` | `MBodyMeterConfig.MutableArray` A mutable array of meter config elements.

  - ### Field Summary

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

      `version`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `MBodyMeterConfig(ProtocolVersion pv)` Constructs a multipart body METER_CONFIG type.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `List<MeterBand>` | `getBands()` Returns the bands applied to this meter; Since 1.3.
    `Set<MeterFlag>` | `getFlags()` Returns the meter flags; Since 1.3.
    `MeterId` | `getMeterId()` Returns the meter id; Since 1.3.
    `int` | `getTotalLength()` Returns the total length of the body, in bytes.
    `String` | `toDebugString()` Returns a string representation useful for debugging.
    `String` | `toString()`
    `void` | `validate()` Validates this structure for completeness and throws an exception if the structure is considered "not complete".

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

      `getVersion, hex, hex`

    - ### 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`

- - ### Constructor Detail

    - #### MBodyMeterConfig

          public MBodyMeterConfig(ProtocolVersion pv)

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

  - ### Method Detail

    - #### getTotalLength

          public int getTotalLength()

      Description copied from interface: `MultipartBody`
      Returns the total length of the body, in bytes.
      Specified by:
        `getTotalLength` in interface `MultipartBody`
      Returns:
        the total length of the body

    - #### validate

          public void validate()
                        throws IncompleteStructureException

      Description copied from class: `OpenflowStructure`
      Validates this structure for completeness and throws an exception if the structure is considered "not complete".

      This default implementation does nothing, i.e. default behavior is that structures are considered complete.

      Subclasses should override this method to check that mandatory fields or other internal state is present, throwing an exception if it is not.

      Specified by:
        `validate` in interface `MultipartBody`
      Overrides:
        `validate` in class `OpenflowStructure`
      Throws:
        `IncompleteStructureException` - if the structure is not complete

    - #### toString

          public String toString()

      Overrides:
        `toString` in class `OpenflowStructure`

    - #### toDebugString

          public String toDebugString()

      Description copied from class: `OpenflowStructure`
      Returns a string representation useful for debugging. This default implementation delegates to `OpenflowStructure.toString()`, but subclasses are free to override this behavior.
      Specified by:
        `toDebugString` in interface `Structure`
      Overrides:
        `toDebugString` in class `OpenflowStructure`
      Returns:
        a (possibly multi-line) string representation of this message

    - #### getMeterId

          public MeterId getMeterId()

      Returns the meter id; Since 1.3.
      Returns:
        the meter id

    - #### getFlags

          public Set<MeterFlag> getFlags()

      Returns the meter flags; Since 1.3.
      Returns:
        the flags

    - #### getBands

          public List<MeterBand> getBands()

      Returns the bands applied to this meter; Since 1.3.
      Returns:
        the bands

Copyright © 2014. All Rights Reserved.