org.openflow.protocol.queue
Class OFQueuePropertyType

java.lang.Object
  extended by org.openflow.protocol.queue.OFQueuePropertyType

public class OFQueuePropertyType
extends java.lang.Object

List of OpenFlow Queue Property types and mappings to wire protocol value and derived classes

Author:
David Erickson (daviderickson@cs.stanford.edu)

Field Summary
protected  java.lang.Class<? extends OFQueueProperty> clazz
           
protected  java.lang.reflect.Constructor<? extends OFQueueProperty> constructor
           
protected  Instantiable<OFQueueProperty> instantiable
           
protected static java.util.Map<java.lang.Short,OFQueuePropertyType> mapping
           
static OFQueuePropertyType MAX_RATE
           
static OFQueuePropertyType MIN_RATE
           
protected  java.lang.String name
           
protected  short type
           
 
Constructor Summary
OFQueuePropertyType(int type, java.lang.String name, java.lang.Class<? extends OFQueueProperty> clazz, Instantiable<OFQueueProperty> instantiable)
          Store some information about the OpenFlow Queue Property type, including wire protocol type number, length, and derived class
 
Method Summary
static void addMapping(short i, OFQueuePropertyType t)
          Adds a mapping from type value to OFQueuePropertyType enum
 java.lang.reflect.Constructor<? extends OFQueueProperty> getConstructor()
          Returns the no-argument Constructor of the implementation class for this OFQueuePropertyType
 Instantiable<OFQueueProperty> getInstantiable()
           
 java.lang.String getName()
           
 short getTypeValue()
           
 OFQueueProperty newInstance()
          Returns a new instance of the OFQueueProperty represented by this OFQueuePropertyType
 void setInstantiable(Instantiable<OFQueueProperty> instantiable)
           
 java.lang.Class<? extends OFQueueProperty> toClass()
           
 java.lang.String toString()
           
static OFQueuePropertyType valueOf(short i)
          Given a wire protocol OpenFlow type number, return the OFQueuePropertyType associated with it
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

MIN_RATE

public static OFQueuePropertyType MIN_RATE

MAX_RATE

public static OFQueuePropertyType MAX_RATE

clazz

protected java.lang.Class<? extends OFQueueProperty> clazz

constructor

protected java.lang.reflect.Constructor<? extends OFQueueProperty> constructor

instantiable

protected Instantiable<OFQueueProperty> instantiable

name

protected java.lang.String name

type

protected short type

mapping

protected static java.util.Map<java.lang.Short,OFQueuePropertyType> mapping
Constructor Detail

OFQueuePropertyType

public OFQueuePropertyType(int type,
                           java.lang.String name,
                           java.lang.Class<? extends OFQueueProperty> clazz,
                           Instantiable<OFQueueProperty> instantiable)
Store some information about the OpenFlow Queue Property type, including wire protocol type number, length, and derived class

Parameters:
type - Wire protocol number associated with this OFQueuePropertyType
name - The name of this type
clazz - The Java class corresponding to this type of OpenFlow Queue Property
instantiable - the instantiable for the OFQueueProperty this type represents
Method Detail

addMapping

public static void addMapping(short i,
                              OFQueuePropertyType t)
Adds a mapping from type value to OFQueuePropertyType enum

Parameters:
i - OpenFlow wire protocol Action type value
t - type

valueOf

public static OFQueuePropertyType valueOf(short i)
Given a wire protocol OpenFlow type number, return the OFQueuePropertyType associated with it

Parameters:
i - wire protocol number
Returns:
OFQueuePropertyType enum type

getTypeValue

public short getTypeValue()
Returns:
Returns the wire protocol value corresponding to this OFQueuePropertyType

toClass

public java.lang.Class<? extends OFQueueProperty> toClass()
Returns:
return the OFQueueProperty subclass corresponding to this OFQueuePropertyType

getConstructor

public java.lang.reflect.Constructor<? extends OFQueueProperty> getConstructor()
Returns the no-argument Constructor of the implementation class for this OFQueuePropertyType

Returns:
the constructor

newInstance

public OFQueueProperty newInstance()
Returns a new instance of the OFQueueProperty represented by this OFQueuePropertyType

Returns:
the new object

getInstantiable

public Instantiable<OFQueueProperty> getInstantiable()
Returns:
the instantiable

setInstantiable

public void setInstantiable(Instantiable<OFQueueProperty> instantiable)
Parameters:
instantiable - the instantiable to set

getName

public java.lang.String getName()

toString

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