com.h3c.of.lib.mp

## Class MBodyPortStatsRequest

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

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

      public class MBodyPortStatsRequest
      extends OpenflowStructure
      implements MultipartBody

  Represents a port stats request (multipart body); Since 1.0.

- - ### Field Summary

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

      `version`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `MBodyPortStatsRequest(ProtocolVersion pv)` Constructs a multipart body PORT_STATS type request.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `BigPortNumber` | `getPort()` Returns the port for which stats are requested; Since 1.0.
    `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

    - #### MBodyPortStatsRequest

          public MBodyPortStatsRequest(ProtocolVersion pv)

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

  - ### Method Detail

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

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

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

    - #### getPort

          public BigPortNumber getPort()

      Returns the port for which stats are requested; Since 1.0.

      A value of `Port.ANY` indicates stats requested for all ports.

      Returns:
        the requested port

Copyright © 2014. All Rights Reserved.