public class MBodyMutableMeterConfig extends MBodyMeterConfig implements MutableStructure
MBodyMeterConfig
.MBodyMeterConfig.Array, MBodyMeterConfig.MutableArray
parseErrorCause, version
Constructor and Description |
---|
MBodyMutableMeterConfig(ProtocolVersion pv)
Constructs a mutable multipart body METER_CONFIG element.
|
Modifier and Type | Method and Description |
---|---|
MBodyMutableMeterConfig |
addBand(MeterBand band)
Adds a meter band to this meter config; Since 1.3.
|
MBodyMutableMeterConfig |
meterFlags(Set<MeterFlag> flags)
Set the meter flags; Since 1.3.
|
MBodyMutableMeterConfig |
meterId(MeterId meterId)
Sets the meter ID for this configuration; Since 1.3.
|
OpenflowStructure |
toImmutable()
Returns an immutable instance of this structure.
|
String |
toString() |
boolean |
writable()
Returns true if this mutable object is still writable.
|
getBands, getFlags, getMeterId, getTotalLength, toDebugString, validate
getVersion, hex, hex, incomplete, parseErrorCause
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getVersion, toDebugString
public MBodyMutableMeterConfig(ProtocolVersion pv)
Note that a freshly constructed instance has MeterId.ALL
as the
default meter id value, and initialized with an empty set of
MeterFlag
.
pv
- the protocol versionpublic OpenflowStructure toImmutable()
MutableStructure
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.
toImmutable
in interface MutableStructure
public boolean writable()
MutableObject
#toImmutable()
method (defined on a sub-interface)
has not yet been invoked.writable
in interface MutableObject
public String toString()
toString
in class MBodyMeterConfig
public MBodyMutableMeterConfig meterId(MeterId meterId)
meterId
- the meter IDInvalidMutableException
- if this instance is no longer writableVersionMismatchException
- if version is < 1.3NullPointerException
- if meterId is nullpublic MBodyMutableMeterConfig meterFlags(Set<MeterFlag> flags)
flags
- the meter flagsInvalidMutableException
- if this instance is no longer writableVersionMismatchException
- if version is < 1.3NullPointerException
- if flags is nullpublic MBodyMutableMeterConfig addBand(MeterBand band)
band
- the meter band to addInvalidMutableException
- if this instance is no longer writableVersionMismatchException
- if version is < 1.3NullPointerException
- if band is nullCopyright © 2016. All Rights Reserved.