com.h3c.of.lib.msg

## Class OfmMutableFlowRemoved

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

- All Implemented Interfaces:
    Message, MutableMessage, MutableObject, Structure

      public class OfmMutableFlowRemoved
      extends OfmFlowRemoved
      implements MutableMessage

  Mutable subclass of `OfmFlowRemoved`.

- - ### 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
    --- | ---
    `OfmMutableFlowRemoved` | `byteCount(long byteCount)` Sets the number of bytes associated with this flow; Since 1.0;
    `void` | `clearXid()` Clears the transaction ID field of this message (sets it to 0).
    `OfmMutableFlowRemoved` | `cookie(long cookie)` Sets the cookie value; Since 1.0.
    `OfmMutableFlowRemoved` | `duration(long seconds, long nano)` Sets the time in seconds, and fractional nanoseconds, that the flow was installed; Since 1.0.
    `OfmMutableFlowRemoved` | `hardTimeout(int hardTimeout)` Sets the hard timeout in seconds; Since 1.2.
    `OfmMutableFlowRemoved` | `idleTimeout(int idleTimeout)` Sets the idle timeout in seconds; Since 1.0.
    `OfmMutableFlowRemoved` | `match(Match match)` Sets the match; Since 1.0.
    `OfmMutableFlowRemoved` | `packetCount(long packetCount)` Sets the number of packets associated with this flow; Since 1.0.
    `OfmMutableFlowRemoved` | `priority(int priority)` Sets the priority level; Since 1.0.
    `OfmMutableFlowRemoved` | `reason(FlowRemovedReason reason)` Sets the reason a flow was removed; Since 1.0.
    `OfmMutableFlowRemoved` | `tableId(TableId tableId)` Sets the table Id; Since 1.1.
    `OpenflowMessage` | `toImmutable()` Returns an immutable instance of this message.
    `String` | `toString()`
    `boolean` | `writable()` Returns true if this mutable object is still writable.

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

      `getByteCount, getCookie, getDurationNanoSeconds, getDurationSeconds, getHardTimeout, getIdleTimeout, getMatch, getPacketCount, getPriority, getReason, getTableId, toDebugString`

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

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

    - ### 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.msg.Message

      `getType, getXid`

    - ### Methods inherited from interface com.h3c.of.lib.Structure

      `getVersion, toDebugString`

- - ### Method Detail

    - #### clearXid

          public void clearXid()

      Description copied from interface: `MutableMessage`
      Clears the transaction ID field of this message (sets it to 0).
      Specified by:
        `clearXid` in interface `MutableMessage`

    - #### toImmutable

          public OpenflowMessage toImmutable()

      Description copied from interface: `MutableMessage`
      Returns an immutable instance of this message. In essence, converts this message to be read-only.

      It is expected that the reference to this mutable message will be dropped. Note that all method calls invoked on a `MutableMessage` after `toImmutable()` has been invoked will result in an `InvalidMutableException` being thrown.

      Specified by:
        `toImmutable` in interface `MutableMessage`
      Returns:
        an immutable instance of this message.

    - #### writable

          public boolean writable()

      Description copied from interface: `MutableObject`
      Returns true if this mutable object is still writable. That is, the `#toImmutable()` method (defined on a sub-interface) has not yet been invoked.
      Specified by:
        `writable` in interface `MutableObject`
      Returns:
        true if this mutable object is still writable

    - #### toString

          public String toString()

      Overrides:
        `toString` in class `OfmFlowRemoved`

    - #### match

          public OfmMutableFlowRemoved match(Match match)

      Sets the match; Since 1.0.
      Parameters:
        `match` - the match to set
      Returns:
        self, for chaining
      Throws:
        `InvalidMutableException` - if this instance is no longer writable
        `NullPointerException` - if match is null
        `IllegalArgumentException` - if match is mutable

    - #### cookie

          public OfmMutableFlowRemoved cookie(long cookie)

      Sets the cookie value; Since 1.0.
      Parameters:
        `cookie` - the cookie value to set
      Returns:
        self, for chaining
      Throws:
        `InvalidMutableException` - if this instance is no longer writable
        `IllegalArgumentException` - if the reserved value (-1) is specified

    - #### priority

          public OfmMutableFlowRemoved priority(int priority)

      Sets the priority level; Since 1.0.

      The priority indicates priority within the specified flow table. Higher numbers indicate higher priorities.

      Parameters:
        `priority` - the priority level to set
      Returns:
        self, for chaining
      Throws:
        `InvalidMutableException` - if this instance is no longer writable
        `IllegalArgumentException` - if the priority level is not u16

    - #### reason

          public OfmMutableFlowRemoved reason(FlowRemovedReason reason)

      Sets the reason a flow was removed; Since 1.0.
      Parameters:
        `reason` - the reason to set
      Returns:
        self, for chaining
      Throws:
        `InvalidMutableException` - if this instance is no longer writable
        `NullPointerException` - if flow removed reason is null

    - #### tableId

          public OfmMutableFlowRemoved tableId(TableId tableId)

      Sets the table Id; Since 1.1.

      The table id field specifies the table into which the flow entry is removed. Table 0 signifies the first table in the pipeline.

      Parameters:
        `tableId` - the table ID to set
      Returns:
        self, for chaining
      Throws:
        `InvalidMutableException` - if this instance is no longer writable
        `VersionMismatchException` - if version is < 1.1
        `NullPointerException` - if tableId is null

    - #### duration

          public OfmMutableFlowRemoved duration(long seconds,
                                       long nano)

      Sets the time in seconds, and fractional nanoseconds, that the flow was installed; Since 1.0.
      Parameters:
        `seconds` - the number of seconds
        `nano` - the number of additional nanoseconds
      Returns:
        self, for chaining
      Throws:
        `InvalidMutableException` - if this instance is no longer writable
        `IllegalArgumentException` - if either seconds or nano is not u32

    - #### idleTimeout

          public OfmMutableFlowRemoved idleTimeout(int idleTimeout)

      Sets the idle timeout in seconds; Since 1.0.
      Parameters:
        `idleTimeout` - the idle timeout in seconds
      Returns:
        self, for chaining
      Throws:
        `InvalidMutableException` - if this instance is no longer writable
        `IllegalArgumentException` - if idleTimeout is not u16

    - #### hardTimeout

          public OfmMutableFlowRemoved hardTimeout(int hardTimeout)

      Sets the hard timeout in seconds; Since 1.2.
      Parameters:
        `hardTimeout` - the hard timeout in seconds
      Returns:
        self, for chaining
      Throws:
        `InvalidMutableException` - if this instance is no longer writable
        `VersionMismatchException` - if version is < 1.2
        `IllegalArgumentException` - if hardTimeout is not u16

    - #### packetCount

          public OfmMutableFlowRemoved packetCount(long packetCount)

      Sets the number of packets associated with this flow; Since 1.0.
      Parameters:
        `packetCount` - the number of associated packets
      Returns:
        self, for chaining
      Throws:
        `InvalidMutableException` - if this instance is no longer writable

    - #### byteCount

          public OfmMutableFlowRemoved byteCount(long byteCount)

      Sets the number of bytes associated with this flow; Since 1.0;
      Parameters:
        `byteCount` - the number of associated bytes
      Returns:
        self, for chaining
      Throws:
        `InvalidMutableException` - if this instance is no longer writable

Copyright © 2014. All Rights Reserved.