public class MBodyPortStatsRequest extends OpenflowStructure implements MultipartBody
parseErrorCause, version
Constructor and Description |
---|
MBodyPortStatsRequest(ProtocolVersion pv)
Constructs a multipart body PORT_STATS type request.
|
Modifier and Type | Method and Description |
---|---|
BigPortNumber |
getPort()
Returns the port for which stats are requested; Since 1.0.
|
int |
getTotalLength()
Returns the total length of the body, in bytes.
|
String |
toDebugString()
Returns a string representation useful for debugging.
|
String |
toString() |
void |
validate()
Validates this structure for completeness and throws an exception
if the structure is considered "not complete".
|
getVersion, hex, hex, incomplete, parseErrorCause
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getVersion
public MBodyPortStatsRequest(ProtocolVersion pv)
pv
- the protocol versionpublic String toString()
toString
in class OpenflowStructure
public String toDebugString()
OpenflowStructure
OpenflowStructure.toString()
, but
subclasses are free to override this behavior.toDebugString
in interface Structure
toDebugString
in class OpenflowStructure
public void validate() throws IncompleteStructureException
OpenflowStructure
This default implementation does nothing, i.e. default behavior is that structures are considered complete.
Subclasses should override this method to check that mandatory fields or other internal state is present, throwing an exception if it is not.
validate
in interface MultipartBody
validate
in class OpenflowStructure
IncompleteStructureException
- if the structure is not completepublic int getTotalLength()
MultipartBody
getTotalLength
in interface MultipartBody
public BigPortNumber getPort()
A value of Port.ANY
indicates stats requested for all ports.
Copyright © 2015. All Rights Reserved.