org.openflow.protocol
Class OFBucket

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

public class OFBucket
extends java.lang.Object
implements OFActionFactoryAware

Represents an ofp_bucket

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

Field Summary
protected  OFActionFactory actionFactory
           
protected  java.util.List<OFAction> actions
           
protected  short length
           
static int MINIMUM_LENGTH
           
protected  int watchGroup
           
protected  int watchPort
           
protected  short weight
           
 
Constructor Summary
OFBucket()
           
 
Method Summary
 boolean equals(java.lang.Object obj)
           
 java.util.List<OFAction> getActions()
          Returns read-only copies of the actions contained in this bucket
 short getLength()
          Returns the length of this bucket (including padding)
 int getLengthU()
          Get the length of this bucket, unsigned
 int getWatchGroup()
          Returns the watchGroup set for this bucket
 int getWatchPort()
          Returns the watchPort set for this bucket
 short getWeight()
          Returns the weight of this bucket
 int hashCode()
           
 void readFrom(java.nio.ByteBuffer data)
           
 void setActionFactory(OFActionFactory actionFactory)
          Sets the OFActionFactory
 OFBucket setActions(java.util.List<OFAction> actions)
          Sets the list of actions this bucket contains
 OFBucket setLength(short length)
          Sets the length of this bucket
 OFBucket setWatchGroup(int watchGroup)
          Sets the watchGroup for this bucket
 OFBucket setWatchPort(int watchPort)
          Sets the watchPort for this bucket
 OFBucket setWeight(short weight)
          Sets the weight of this bucket
 java.lang.String toString()
           
 void writeTo(java.nio.ByteBuffer data)
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

MINIMUM_LENGTH

public static int MINIMUM_LENGTH

length

protected short length

weight

protected short weight

watchPort

protected int watchPort

watchGroup

protected int watchGroup

actionFactory

protected OFActionFactory actionFactory

actions

protected java.util.List<OFAction> actions
Constructor Detail

OFBucket

public OFBucket()
Method Detail

getActions

public java.util.List<OFAction> getActions()
Returns read-only copies of the actions contained in this bucket

Returns:
a list of ordered OFAction objects

setActions

public OFBucket setActions(java.util.List<OFAction> actions)
Sets the list of actions this bucket contains

Parameters:
actions - a list of ordered OFAction objects

getWatchPort

public int getWatchPort()
Returns the watchPort set for this bucket

Returns:
the watch port

setWatchPort

public OFBucket setWatchPort(int watchPort)
Sets the watchPort for this bucket

Parameters:
the - watch port

getWatchGroup

public int getWatchGroup()
Returns the watchGroup set for this bucket

Returns:
the watch group

setWatchGroup

public OFBucket setWatchGroup(int watchGroup)
Sets the watchGroup for this bucket

Parameters:
the - watch group

getLength

public short getLength()
Returns the length of this bucket (including padding)

Returns:
the length

getLengthU

public int getLengthU()
Get the length of this bucket, unsigned

Returns:
the length unsigned

setLength

public OFBucket setLength(short length)
Sets the length of this bucket

Parameters:
length -

getWeight

public short getWeight()
Returns the weight of this bucket

Returns:
the weight

setWeight

public OFBucket setWeight(short weight)
Sets the weight of this bucket

Parameters:
weight -

readFrom

public void readFrom(java.nio.ByteBuffer data)

writeTo

public void writeTo(java.nio.ByteBuffer data)

setActionFactory

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

Specified by:
setActionFactory in interface OFActionFactoryAware

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

equals

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

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object