public class OFRoleVendorData extends OFNiciraVendorData
| Modifier and Type | Field and Description |
|---|---|
static int |
NX_ROLE_MASTER
Role value indicating that the controller is in the MASTER role.
|
static int |
NX_ROLE_OTHER
Role value indicating that the controller is in the OTHER role.
|
static int |
NX_ROLE_SLAVE
Role value indicating that the controller is in the SLAVE role.
|
protected int |
role |
dataType, NX_VENDOR_ID| Constructor and Description |
|---|
OFRoleVendorData()
Construct an uninitialized OFRoleVendorData
|
OFRoleVendorData(int dataType)
Construct an OFRoleVendorData with the specified data type (i.e.
|
OFRoleVendorData(int dataType,
int role)
Construct an OFRoleVendorData with the specified data type (i.e.
|
| Modifier and Type | Method and Description |
|---|---|
int |
getLength()
Get the length of the vendor data.
|
int |
getRole() |
void |
readFrom(org.jboss.netty.buffer.ChannelBuffer data,
int length)
Read the role vendor data from the ChannelBuffer
|
void |
setRole(int role) |
void |
writeTo(org.jboss.netty.buffer.ChannelBuffer data)
Write the role vendor data to the ChannelBuffer
|
getDataType, setDataTypepublic static final int NX_ROLE_OTHER
public static final int NX_ROLE_MASTER
public static final int NX_ROLE_SLAVE
protected int role
public OFRoleVendorData()
public OFRoleVendorData(int dataType)
dataType - public OFRoleVendorData(int dataType,
int role)
dataType - either role request or role reply data typepublic int getRole()
public void setRole(int role)
role - the role value of the role vendor datapublic int getLength()
OFNiciraVendorDatagetLength in interface OFVendorDatagetLength in class OFNiciraVendorDatapublic void readFrom(org.jboss.netty.buffer.ChannelBuffer data,
int length)
readFrom in interface OFVendorDatareadFrom in class OFNiciraVendorDatadata - the channel buffer from which we're deserializinglength - the length to the end of the enclosing messagepublic void writeTo(org.jboss.netty.buffer.ChannelBuffer data)
writeTo in interface OFVendorDatawriteTo in class OFNiciraVendorDatadata - the channel buffer to which we're serializingCopyright © 2015. All rights reserved.