public class OfmMutableMultipartRequest extends OfmMultipartRequest implements MutableMessage
OfmMultipartRequest
.length
Modifier and Type | Method and Description |
---|---|
OfmMutableMultipartRequest |
body(MultipartBody body)
Sets the body of this multipart request; Since 1.0.
|
void |
clearXid()
Clears the transaction ID field of this message (sets it to 0).
|
OfmMutableMultipartRequest |
setMoreFlag()
Sets the REQUEST_MORE flag.
|
OpenflowMessage |
toImmutable()
Returns an immutable instance of this message.
|
String |
toString() |
OfmMutableMultipartRequest |
type(MultipartType type)
Sets the type of this multipart request; Since 1.0.
|
boolean |
writable()
Returns true if this mutable object is still writable.
|
getBody, getFlags, getMultipartType, hasMore, toDebugString, validate
decodeHeader, getType, getVersion, getXid, hex, hex, length
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getVersion, toDebugString
public void clearXid()
MutableMessage
clearXid
in interface MutableMessage
public OpenflowMessage toImmutable()
MutableMessage
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.
toImmutable
in interface MutableMessage
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 OfmMultipartRequest
public OfmMutableMultipartRequest type(MultipartType type)
This method should only be used for request types that have
no corresponding body.
For those requests that have a body, use body(MultipartBody)
instead.
type
- the multipart type for this requestInvalidMutableException
- if this instance is no longer writableNullPointerException
- if type is nullIllegalArgumentException
- if the type requires a bodybody(MultipartBody)
public OfmMutableMultipartRequest body(MultipartBody body)
This method should only be used for request types that have a body.
For those requests that do not have a body, use
type(MultipartType)
instead.
body
- the multipart body for this requestInvalidMutableException
- if this instance is no longer writableNullPointerException
- if body is nullVersionMismatchException
- if the body is not the same version
as this instancetype(MultipartType)
public OfmMutableMultipartRequest setMoreFlag()
The presence of this flag indicates to the receiver that more (related)
multipart-request messages are on their way; Only the last request
in such a sequence should have this flag false
(cleared).
The default setting for this flag is false
; calling this
method will latch the flag to true
.
InvalidMutableException
- if this instance is no longer writableCopyright © 2015. All Rights Reserved.