com.h3c.of.lib.mp

## Class MBodyMeterRequest

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

- All Implemented Interfaces:
    MultipartBody, Structure
  Direct Known Subclasses:
    MBodyMeterConfigRequest, MBodyMeterStatsRequest, MBodyMutableMeterRequest

      public abstract class MBodyMeterRequest
      extends OpenflowStructure
      implements MultipartBody

  Base class for meter request (multipart body); Since 1.3.

  Used by the `MBodyMeterStatsRequest` and the MBodyMeterConfigRequest.

- - ### Field Summary

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

      `version`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `MeterId` | `getMeterId()` Returns the meter id requested; since 1.3
    `int` | `getTotalLength()` Returns the total length of the body, in bytes.
    `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, toDebugString`

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

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

    - #### getMeterId

          public MeterId getMeterId()

      Returns the meter id requested; since 1.3
      Returns:
        the meter id

Copyright © 2014. All Rights Reserved.