org.openflow.protocol
Class OFGroupMod

java.lang.Object
  extended by org.openflow.protocol.OFMessage
      extended by org.openflow.protocol.OFGroupMod
All Implemented Interfaces:
OFActionFactoryAware

public class OFGroupMod
extends OFMessage
implements OFActionFactoryAware

Represents an ofp_group_mod message

Author:
Srini Seetharaman (srini.seetharaman@gmail.com)

Field Summary
protected  OFActionFactory actionFactory
           
protected  java.util.List<OFBucket> buckets
           
protected  short command
           
protected  int groupId
           
protected  byte groupType
           
static int MINIMUM_LENGTH
           
static short OFPGC_ADD
           
static short OFPGC_DELETE
           
static short OFPGC_MODIFY
           
static byte OFPGT_ALL
           
static byte OFPGT_FF
           
static byte OFPGT_INDIRECT
           
static byte OFPGT_SELECT
           
 
Fields inherited from class org.openflow.protocol.OFMessage
length, OFP_VERSION, type, version, xid
 
Constructor Summary
OFGroupMod()
           
 
Method Summary
 void computeLength()
          This method is called during the writeTo method for serialization and is expected to set the length of the message.
 boolean equals(java.lang.Object obj)
           
 java.util.List<OFBucket> getBuckets()
          Returns read-only copies of the buckets
 short getCommand()
           
 int getGroupId()
           
 byte getGroupType()
           
 int hashCode()
           
 void readFrom(java.nio.ByteBuffer data)
          Read this message off the wire from the specified ByteBuffer
 void setActionFactory(OFActionFactory actionFactory)
          Sets the OFActionFactory
 OFGroupMod setBuckets(java.util.List<OFBucket> buckets)
          Sets the list of buckets this groupmod contains
 OFGroupMod setCommand(short command)
           
 OFGroupMod setGroupId(int groupId)
           
 OFGroupMod setGroupType(byte groupType)
           
 void writeTo(java.nio.ByteBuffer data)
          Write this message's binary format to the specified ByteBuffer
 
Methods inherited from class org.openflow.protocol.OFMessage
getLength, getLengthU, getType, getVersion, getXid, setLength, setLengthU, setType, setVersion, setXid, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

MINIMUM_LENGTH

public static int MINIMUM_LENGTH

OFPGC_ADD

public static final short OFPGC_ADD
See Also:
Constant Field Values

OFPGC_MODIFY

public static final short OFPGC_MODIFY
See Also:
Constant Field Values

OFPGC_DELETE

public static final short OFPGC_DELETE
See Also:
Constant Field Values

OFPGT_ALL

public static final byte OFPGT_ALL
See Also:
Constant Field Values

OFPGT_SELECT

public static final byte OFPGT_SELECT
See Also:
Constant Field Values

OFPGT_INDIRECT

public static final byte OFPGT_INDIRECT
See Also:
Constant Field Values

OFPGT_FF

public static final byte OFPGT_FF
See Also:
Constant Field Values

actionFactory

protected OFActionFactory actionFactory

command

protected short command

groupType

protected byte groupType

groupId

protected int groupId

buckets

protected java.util.List<OFBucket> buckets
Constructor Detail

OFGroupMod

public OFGroupMod()
Method Detail

getGroupId

public int getGroupId()
Returns:
the groupId

setGroupId

public OFGroupMod setGroupId(int groupId)
Parameters:
groupId - the groupId to set

getGroupType

public byte getGroupType()
Returns:
the type

setGroupType

public OFGroupMod setGroupType(byte groupType)
Parameters:
type - the type to set

getCommand

public short getCommand()
Returns:
the command

setCommand

public OFGroupMod setCommand(short command)
Parameters:
command - the command to set

getBuckets

public java.util.List<OFBucket> getBuckets()
Returns read-only copies of the buckets

Returns:
a list of ordered OFBucket objects

setBuckets

public OFGroupMod setBuckets(java.util.List<OFBucket> buckets)
Sets the list of buckets this groupmod contains

Parameters:
buckets - a list of ordered OFBucket objects

setActionFactory

public void setActionFactory(OFActionFactory actionFactory)
Description copied from interface: OFActionFactoryAware
Sets the OFActionFactory

Specified by:
setActionFactory in interface OFActionFactoryAware

readFrom

public void readFrom(java.nio.ByteBuffer data)
Description copied from class: OFMessage
Read this message off the wire from the specified ByteBuffer

Overrides:
readFrom in class OFMessage

writeTo

public void writeTo(java.nio.ByteBuffer data)
Description copied from class: OFMessage
Write this message's binary format to the specified ByteBuffer

Overrides:
writeTo in class OFMessage

hashCode

public int hashCode()
Overrides:
hashCode in class OFMessage

equals

public boolean equals(java.lang.Object obj)
Overrides:
equals in class OFMessage

computeLength

public void computeLength()
Description copied from class: OFMessage
This method is called during the writeTo method for serialization and is expected to set the length of the message. If your class manually sets the length you should override this to do nothing.

Overrides:
computeLength in class OFMessage