org.openflow.protocol.meter
Class OFMeterBandType

java.lang.Object
  extended by org.openflow.protocol.meter.OFMeterBandType

public class OFMeterBandType
extends java.lang.Object

List of OpenFlow meter band types and mappings to wire protocol value and derived classes

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

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

Field Detail

DROP

public static OFMeterBandType DROP

DSCP_REMARK

public static OFMeterBandType DSCP_REMARK

clazz

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

constructor

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

instantiable

protected Instantiable<OFMeterBand> instantiable

name

protected java.lang.String name

type

protected short type

mapping

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

OFMeterBandType

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

Parameters:
type - Wire protocol number associated with this OFMeterBandType
name - The name of this type
clazz - The Java class corresponding to this type of OpenFlow meter band
instantiable - the instantiable for the OFMeterBand this type represents
Method Detail

addMapping

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

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

valueOf

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

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

getValues

public static java.util.Set<java.lang.Short> getValues()

getTypeValue

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

toClass

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

getConstructor

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

Returns:
the constructor

newInstance

public OFMeterBand newInstance()
Returns a new instance of the OFMeterBand represented by this OFMeterBandType

Returns:
the new object

getInstantiable

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

setInstantiable

public void setInstantiable(Instantiable<OFMeterBand> 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