com.h3c.of.lib.msg

## Class OfmFlowMod

- java.lang.Object
- - com.h3c.nbio.AbstractMessage
  - - com.h3c.of.lib.msg.OpenflowMessage
    - - com.h3c.of.lib.msg.OfmFlowMod

- All Implemented Interfaces:
    Message, Structure
  Direct Known Subclasses:
    OfmMutableFlowMod

      public class OfmFlowMod
      extends OpenflowMessage

  Represents an OpenFlow FLOW_MOD message; Since 1.0.

- - ### Nested Class Summary

    - ### Nested classes/interfaces inherited from class com.h3c.of.lib.msg.OpenflowMessage

      `OpenflowMessage.Header`

  - ### Field Summary

    - ### Fields inherited from class com.h3c.nbio.AbstractMessage

      `length`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `List<Action>` | `getActions()` Returns the list of actions; Since 1.0; Removed at 1.1. For messages 1.1 and higher, this method will always return null.
    `BufferId` | `getBufferId()` Returns the ID of the packet buffer; Since 1.0. This may be `OFP_NO_BUFFER`.
    `FlowModCommand` | `getCommand()` Returns the flow mod command; Since 1.0.
    `long` | `getCookie()` Returns the opaque controller-issued identifier; Since 1.0.
    `long` | `getCookieMask()` Returns the cookie mask; Since 1.1.
    `Set<FlowModFlag>` | `getFlags()` Returns the set of flow mod flags; Since 1.0.
    `int` | `getHardTimeout()` Returns the max time before discarding (seconds); Since 1.0.
    `int` | `getIdleTimeout()` Returns the idle time before discarding (seconds); Since 1.0.
    `List<Instruction>` | `getInstructions()` Returns the list of instructions; Since 1.1. For 1.0 messages, this method will always return null.
    `Match` | `getMatch()` Returns the match; Since 1.0.
    `GroupId` | `getOutGroup()` For `DELETE*` commands, requires matching entries to include this group as an output group; Since 1.1. A value of `Group#ANY` indicates no restriction.
    `BigPortNumber` | `getOutPort()` For `DELETE*` commands, requires matching entries to include this port as an output port; Since 1.0. A value of `Port.ANY` indicates no restriction.
    `int` | `getPriority()` Returns the priority level of the flow entry; Since 1.0.
    `TableId` | `getTableId()` Returns the table ID; Since 1.1.
    `String` | `toDebugString()` Returns a string representation useful for debugging.
    `String` | `toString()`
    `void` | `validate()` Validates this message for completeness and throws an exception if the message is considered "not complete".

    - ### Methods inherited from class com.h3c.of.lib.msg.OpenflowMessage

      `decodeHeader, getType, getVersion, getXid, hex, hex, length`

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

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

- - ### Method Detail

    - #### toString

          public String toString()

      Overrides:
        `toString` in class `OpenflowMessage`

    - #### toDebugString

          public String toDebugString()

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

    - #### validate

          public void validate()
                        throws IncompleteMessageException

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

      This default implementation does nothing, i.e. default behavior is that messages 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.

      Overrides:
        `validate` in class `OpenflowMessage`
      Throws:
        `IncompleteMessageException` - if the message is not complete

    - #### getCookie

          public long getCookie()

      Returns the opaque controller-issued identifier; Since 1.0.
      Returns:
        the cookie

    - #### getCookieMask

          public long getCookieMask()

      Returns the cookie mask; Since 1.1.
      The mask is used to restrict the cookie bits that must match when the command is `MODIFY*` or `DELETE*`. A value of 0 indicates no restrictions.

      For 1.0 messages this method returns 0.

      Returns:
        the cookie mask

    - #### getTableId

          public TableId getTableId()

      Returns the table ID; Since 1.1.
      The ID of the table to put the flow in. For `DELETE*` commands, `TableId.ALL` can also be used to delete matching flows from all tables.

      For 1.0 messages this method returns 0.

      Returns:
        the table ID

    - #### getCommand

          public FlowModCommand getCommand()

      Returns the flow mod command; Since 1.0.
      Returns:
        the command

    - #### getIdleTimeout

          public int getIdleTimeout()

      Returns the idle time before discarding (seconds); Since 1.0.
      Returns:
        the idle time before discarding the flow (seconds)

    - #### getHardTimeout

          public int getHardTimeout()

      Returns the max time before discarding (seconds); Since 1.0.
      Returns:
        the max time before discarding the flow (seconds)

    - #### getPriority

          public int getPriority()

      Returns the priority level of the flow entry; Since 1.0.
      Returns:
        the priority level

    - #### getBufferId

          public BufferId getBufferId()

      Returns the ID of the packet buffer; Since 1.0.
      This may be `OFP_NO_BUFFER`. TODO: where is this defined?

      Not meaningful for `DELETE*` commands.

      Returns:
        the ID of the packet buffer

    - #### getOutPort

          public BigPortNumber getOutPort()

      For `DELETE*` commands, requires matching entries to include this port as an output port; Since 1.0.
      A value of `Port.ANY` indicates no restriction.
      Returns:
        the required output port number

    - #### getOutGroup

          public GroupId getOutGroup()

      For `DELETE*` commands, requires matching entries to include this group as an output group; Since 1.1.
      A value of `Group#ANY` indicates no restriction.
      Returns:
        the required output group number

    - #### getFlags

          public Set<FlowModFlag> getFlags()

      Returns the set of flow mod flags; Since 1.0.
      Returns:
        the set of flags

    - #### getMatch

          public Match getMatch()

      Returns the match; Since 1.0.
      Returns:
        the match

    - #### getActions

          public List<Action> getActions()

      Returns the list of actions; Since 1.0; Removed at 1.1.
      For messages 1.1 and higher, this method will always return null.
      Returns:
        the list of associated actions
      See Also:
        `getInstructions()`

    - #### getInstructions

          public List<Instruction> getInstructions()

      Returns the list of instructions; Since 1.1.
      For 1.0 messages, this method will always return null.
      Returns:
        the list of associated instructions
      See Also:
        `getActions()`

Copyright © 2014. All Rights Reserved.