com.h3c.of.lib.mp

## Class MBodyMutableExperimenter

- java.lang.Object
- - com.h3c.of.lib.OpenflowStructure
  - - com.h3c.of.lib.mp.MBodyExperimenter
    - - com.h3c.of.lib.mp.MBodyMutableExperimenter

- All Implemented Interfaces:
    MultipartBody, MutableObject, MutableStructure, Structure

      public class MBodyMutableExperimenter
      extends MBodyExperimenter
      implements MutableStructure

  Mutable subclass of `MBodyExperimenter`.

- - ### Field Summary

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

      `version`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `MBodyMutableExperimenter(ProtocolVersion pv)` Constructs a mutable multipart body EXPERIMENTER extension type.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `MBodyMutableExperimenter` | `data(byte[] data)` Sets the experimenter-defined data; Since 1.0.
    `MBodyMutableExperimenter` | `expId(ExperimenterId id)` Sets the experimenter ID; Since 1.0.
    `MBodyMutableExperimenter` | `expId(int encodedId)` Sets the experimenter ID; Since 1.0.
    `MBodyMutableExperimenter` | `expType(int expType)` Sets the experimenter type; Since 1.2
    `OpenflowStructure` | `toImmutable()` Returns an immutable instance of this structure.
    `String` | `toString()`
    `boolean` | `writable()` Returns true if this mutable object is still writable.

    - ### Methods inherited from class com.h3c.of.lib.mp.MBodyExperimenter

      `getData, getExpId, getExpType, getId, getTotalLength, toDebugString`

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

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

      `getVersion, toDebugString`

    - ### Methods inherited from interface com.h3c.of.lib.mp.MultipartBody

      `validate`

- - ### Constructor Detail

    - #### MBodyMutableExperimenter

          public MBodyMutableExperimenter(ProtocolVersion pv)

      Constructs a mutable multipart body EXPERIMENTER extension type.
      Parameters:
        `pv` - the protocol version

  - ### Method Detail

    - #### toImmutable

          public OpenflowStructure toImmutable()

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

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

      Specified by:
        `toImmutable` in interface `MutableStructure`
      Returns:
        an immutable instance of this structure.

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

    - #### expId

          public MBodyMutableExperimenter expId(ExperimenterId id)

      Sets the experimenter ID; Since 1.0. Renamed from vendor ID at 1.1.
      Parameters:
        `id` - the experimenter ID
      Returns:
        self, for chaining
      Throws:
        `InvalidMutableException` - if this instance is no longer writable
        `NullPointerException` - if id is null

    - #### expId

          public MBodyMutableExperimenter expId(int encodedId)

      Sets the experimenter ID; Since 1.0. Renamed from vendor ID at 1.1.
      Parameters:
        `encodedId` - the encoded experimenter ID
      Returns:
        self, for chaining
      Throws:
        `InvalidMutableException` - if this instance is no longer writable

    - #### expType

          public MBodyMutableExperimenter expType(int expType)

      Sets the experimenter type; Since 1.2
      Parameters:
        `expType` - the experimenter type
      Returns:
        self, for chaining
      Throws:
        `InvalidMutableException` - if this instance is no longer writable
        `VersionMismatchException` - if version is < 1.2

    - #### data

          public MBodyMutableExperimenter data(byte[] data)

      Sets the experimenter-defined data; Since 1.0.
      Parameters:
        `data` - the data
      Returns:
        self, for chaining
      Throws:
        `InvalidMutableException` - if this instance is no longer writable
        `NullPointerException` - if data is null

Copyright © 2014. All Rights Reserved.