org.openflow.protocol.instruction
Enum OFInstructionType

java.lang.Object
  extended by java.lang.Enum<OFInstructionType>
      extended by org.openflow.protocol.instruction.OFInstructionType
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable<OFInstructionType>

public enum OFInstructionType
extends java.lang.Enum<OFInstructionType>

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

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

Enum Constant Summary
APPLY_ACTIONS
           
CLEAR_ACTIONS
           
GOTO_TABLE
           
METER
           
WRITE_ACTIONS
           
WRITE_METADATA
           
 
Field Summary
protected  java.lang.Class<? extends OFInstruction> clazz
           
protected  java.lang.reflect.Constructor<? extends OFInstruction> constructor
           
protected  Instantiable<OFInstruction> instantiable
           
protected static java.util.Map<java.lang.Short,OFInstructionType> mapping
           
protected  short type
           
 
Method Summary
static void addMapping(short i, OFInstructionType t)
          Adds a mapping from type value to OFInstructionType enum
 java.lang.reflect.Constructor<? extends OFInstruction> getConstructor()
          Returns the no-argument Constructor of the implementation class for this OFInstructionType
 Instantiable<OFInstruction> getInstantiable()
           
 short getTypeValue()
           
 OFInstruction newInstance()
          Returns a new instance of the OFInstruction represented by this OFInstructionType
 void setInstantiable(Instantiable<OFInstruction> instantiable)
           
 java.lang.Class<? extends OFInstruction> toClass()
           
static OFInstructionType valueOf(short i)
          Given a wire protocol OpenFlow type number, return the OFInstructionType associated with it
static OFInstructionType valueOf(java.lang.String name)
          Returns the enum constant of this type with the specified name.
static OFInstructionType[] values()
          Returns an array containing the constants of this enum type, in the order they are declared.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

GOTO_TABLE

public static final OFInstructionType GOTO_TABLE

WRITE_METADATA

public static final OFInstructionType WRITE_METADATA

WRITE_ACTIONS

public static final OFInstructionType WRITE_ACTIONS

APPLY_ACTIONS

public static final OFInstructionType APPLY_ACTIONS

CLEAR_ACTIONS

public static final OFInstructionType CLEAR_ACTIONS

METER

public static final OFInstructionType METER
Field Detail

mapping

protected static java.util.Map<java.lang.Short,OFInstructionType> mapping

clazz

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

constructor

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

instantiable

protected Instantiable<OFInstruction> instantiable

type

protected short type
Method Detail

values

public static OFInstructionType[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
for (OFInstructionType c : OFInstructionType.values())
    System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they are declared

valueOf

public static OFInstructionType valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Parameters:
name - the name of the enum constant to be returned.
Returns:
the enum constant with the specified name
Throws:
java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
java.lang.NullPointerException - if the argument is null

addMapping

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

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

valueOf

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

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

getTypeValue

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

toClass

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

getConstructor

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

Returns:
the constructor

newInstance

public OFInstruction newInstance()
Returns a new instance of the OFInstruction represented by this OFInstructionType

Returns:
the new object

getInstantiable

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

setInstantiable

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