com.h3c.of.lib.instr

## Class Action

- java.lang.Object
- - com.h3c.of.lib.OpenflowStructure
  - - com.h3c.of.lib.instr.Action

- All Implemented Interfaces:
    Structure, Comparable<Action>
  Direct Known Subclasses:
    ActCopyTtlIn, ActCopyTtlOut, ActDecMplsTtl, ActDecNwTtl, ActExperimenter, ActGroup, ActHeader, ActOutput, ActPopMpls, ActPopPbb, ActPopVlan, ActPushMpls, ActPushPbb, ActPushVlan, ActSetField, ActSetMplsTtl, ActSetNwTtl, ActSetQueue

      public abstract class Action
      extends OpenflowStructure
      implements Comparable<Action>

  Represents a Flow action. This abstract class serves as the base for all actions.

- - ### Field Summary

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

      `version`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `int` | `compareTo(Action o)` Comparable implemented to sort actions according to their decoded action type.
    `ActionType` | `getActionType()` Returns the action type.
    `int` | `getTotalLength()` Returns the total length of this action, in bytes.
    `String` | `toDebugString()` Returns a string representation useful for debugging.
    `String` | `toDebugString(int indent)` Returns a string representation useful for debugging.
    `String` | `toString()`

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

      `getVersion, hex, hex, validate`

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

    - #### toDebugString

          public String toDebugString(int indent)

      Returns a string representation useful for debugging. This default implementation delegates to `toString()`, but subclasses are free to override this behavior.
      Parameters:
        `indent` - the number of spaces with which to prefix each line
      Returns:
        a (possibly multi-line) string representation of this action

    - #### toDebugString

          public String toDebugString()

      Returns a string representation useful for debugging. This default implementation delegates to `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 instruction

    - #### getActionType

          public ActionType getActionType()

      Returns the action type.
      Returns:
        the action type

    - #### compareTo

          public int compareTo(Action o)

      Comparable implemented to sort actions according to their decoded action type.
      Specified by:
        `compareTo` in interface `Comparable<Action>`
      Parameters:
        `o` - the other action
      Returns:
        a result conforming to the Comparable contract

    - #### getTotalLength

          public int getTotalLength()

      Returns the total length of this action, in bytes.
      Returns:
        the total length, in bytes

Copyright © 2014. All Rights Reserved.