com.h3c.of.lib.mp

## Class MBodyFlowStats

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

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

      public class MBodyFlowStats
      extends OpenflowStructure
      implements MultipartBody

  Represents a flow stats element; part of a reply to a flow-stats request multipart message; Since 1.0.
  See Also:
    `MBodyFlowStatsRequest`

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `static class` | `MBodyFlowStats.Array` Represents an array of flow stats elements.
    `static class` | `MBodyFlowStats.MutableArray` A mutable array of flow stats elements.

  - ### Field Summary

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

      `version`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `MBodyFlowStats(ProtocolVersion pv)` Constructs an OpenFlow structure.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `List<Action>` | `getActions()` Returns the list of actions for this flow; Since 1.0; Dropped at 1.1.
    `long` | `getByteCount()` Returns the number of bytes in the flow; Since 1.0.
    `long` | `getCookie()` Returns this flow's cookie; Since 1.0.
    `long` | `getDurationNsec()` Returns the time this flow has been alive in nanoseconds beyond `getDurationSec()`; Since 1.0.
    `long` | `getDurationSec()` Returns the time this flow has been alive in seconds; Since 1.0.
    `Set<FlowModFlag>` | `getFlags()` Returns the set of flow mod flags that apply to this flow; Since 1.3.
    `int` | `getHardTimeout()` Returns the hard timeout for this flow, in seconds; Since 1.0.
    `int` | `getIdleTimeout()` Returns the idle timeout for this flow, in seconds; Since 1.0.
    `List<Instruction>` | `getInstructions()` Returns the list of instructions for this flow; Since 1.1.
    `Match` | `getMatch()` Returns the match for this flow; Since 1.0.
    `long` | `getPacketCount()` Returns the number of packets in the flow; Since 1.0.
    `int` | `getPriority()` Returns the priority of this flow; Since 1.0.
    `TableId` | `getTableId()` Returns the id of the table this flow came from; Since 1.0.
    `int` | `getTotalLength()` Returns the total length of the body, in bytes.
    `String` | `toDebugString()` Returns a string representation useful for debugging.
    `String` | `toDebugString(int indent)` Returns a multi-line representation of this Flow Stats object.
    `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

    - #### MBodyFlowStats

          public MBodyFlowStats(ProtocolVersion pv)

      Constructs an OpenFlow structure.
      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

    - #### toDebugString

          public String toDebugString(int indent)

      Returns a multi-line representation of this Flow Stats object.
      Parameters:
        `indent` - the additional indent (number of spaces)
      Returns:
        a multi-line representation

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

    - #### getTableId

          public TableId getTableId()

      Returns the id of the table this flow came from; Since 1.0.
      Returns:
        the table id

    - #### getDurationSec

          public long getDurationSec()

      Returns the time this flow has been alive in seconds; Since 1.0. This value is u32.
      Returns:
        the time the flow has been alive (seconds)

    - #### getDurationNsec

          public long getDurationNsec()

      Returns the time this flow has been alive in nanoseconds beyond `getDurationSec()`; Since 1.0. This value is u32.
      Returns:
        the additional time the flow has been alive (nanoseconds)

    - #### getPriority

          public int getPriority()

      Returns the priority of this flow; Since 1.0. This value is u16.
      Returns:
        the priority

    - #### getIdleTimeout

          public int getIdleTimeout()

      Returns the idle timeout for this flow, in seconds; Since 1.0. That is, this flow will expire after it has been idle for this number of seconds. This value is u16.
      Returns:
        the idle timeout for this flow

    - #### getHardTimeout

          public int getHardTimeout()

      Returns the hard timeout for this flow, in seconds; Since 1.0. That is, this flow will expire after this number of seconds. This value is u16.
      Returns:
        the hard timeout for this flow

    - #### getFlags

          public Set<FlowModFlag> getFlags()

      Returns the set of flow mod flags that apply to this flow; Since 1.3.

      For versions prior to 1.3, this method will return null.

      Returns:
        the set of flow mod flags

    - #### getCookie

          public long getCookie()

      Returns this flow's cookie; Since 1.0.
      Returns:
        the cookie

    - #### getPacketCount

          public long getPacketCount()

      Returns the number of packets in the flow; Since 1.0.
      Returns:
        the number of packets in the flow

    - #### getByteCount

          public long getByteCount()

      Returns the number of bytes in the flow; Since 1.0.
      Returns:
        the number of bytes in the flow

    - #### getMatch

          public Match getMatch()

      Returns the match for this flow; Since 1.0. That is, the fields of a packet that must match in order to be associated with this flow.
      Returns:
        the match criteria

    - #### getInstructions

          public List<Instruction> getInstructions()

      Returns the list of instructions for this flow; Since 1.1. That is, the instructions to be carried out when a packet matches the flow.

      For 1.0, this method will return null.

      Returns:
        the list of instructions

    - #### getActions

          public List<Action> getActions()

      Returns the list of actions for this flow; Since 1.0; Dropped at 1.1. That is, the actions to be carried out when a packet matches the flow.

      For versions later than 1.0, this method will return null.

      Returns:
        the list of actions

Copyright © 2014. All Rights Reserved.