org.openflow.protocol.action
Enum OFActionType

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

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

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

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

Enum Constant Summary
COPY_TTL_IN
           
COPY_TTL_OUT
           
DEC_MPLS_TTL
           
DEC_NW_TTL
           
GROUP
           
OUTPUT
           
POP_MPLS
           
POP_PBB
           
POP_VLAN
           
PUSH_MPLS
           
PUSH_PBB
           
PUSH_VLAN
           
SET_FIELD
           
SET_MPLS_TTL
           
SET_NW_TTL
           
SET_QUEUE
           
VENDOR
           
 
Field Summary
protected  java.lang.Class<? extends OFAction> clazz
           
protected  java.lang.reflect.Constructor<? extends OFAction> constructor
           
protected  Instantiable<OFAction> instantiable
           
protected static java.util.Map<java.lang.Short,OFActionType> mapping
           
protected  short type
           
 
Method Summary
static void addMapping(short i, OFActionType t)
          Adds a mapping from type value to OFActionType enum
 java.lang.reflect.Constructor<? extends OFAction> getConstructor()
          Returns the no-argument Constructor of the implementation class for this OFActionType
 Instantiable<OFAction> getInstantiable()
           
 short getTypeValue()
           
static java.util.Set<java.lang.Short> getValues()
           
 OFAction newInstance()
          Returns a new instance of the OFAction represented by this OFActionType
 void setInstantiable(Instantiable<OFAction> instantiable)
           
 java.lang.Class<? extends OFAction> toClass()
           
static OFActionType valueOf(short i)
          Given a wire protocol OpenFlow type number, return the OFActionType associated with it
static OFActionType valueOf(java.lang.String name)
          Returns the enum constant of this type with the specified name.
static OFActionType[] 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

OUTPUT

public static final OFActionType OUTPUT

COPY_TTL_OUT

public static final OFActionType COPY_TTL_OUT

COPY_TTL_IN

public static final OFActionType COPY_TTL_IN

SET_MPLS_TTL

public static final OFActionType SET_MPLS_TTL

DEC_MPLS_TTL

public static final OFActionType DEC_MPLS_TTL

PUSH_VLAN

public static final OFActionType PUSH_VLAN

POP_VLAN

public static final OFActionType POP_VLAN

PUSH_MPLS

public static final OFActionType PUSH_MPLS

POP_MPLS

public static final OFActionType POP_MPLS

SET_QUEUE

public static final OFActionType SET_QUEUE

GROUP

public static final OFActionType GROUP

SET_NW_TTL

public static final OFActionType SET_NW_TTL

DEC_NW_TTL

public static final OFActionType DEC_NW_TTL

SET_FIELD

public static final OFActionType SET_FIELD

PUSH_PBB

public static final OFActionType PUSH_PBB

POP_PBB

public static final OFActionType POP_PBB

VENDOR

public static final OFActionType VENDOR
Field Detail

mapping

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

clazz

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

constructor

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

instantiable

protected Instantiable<OFAction> instantiable

type

protected short type
Method Detail

values

public static OFActionType[] 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 (OFActionType c : OFActionType.values())
    System.out.println(c);

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

valueOf

public static OFActionType 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,
                              OFActionType t)
Adds a mapping from type value to OFActionType enum

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

valueOf

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

Parameters:
i - wire protocol number
Returns:
OFActionType 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 OFActionType

toClass

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

getConstructor

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

Returns:
the constructor

newInstance

public OFAction newInstance()
Returns a new instance of the OFAction represented by this OFActionType

Returns:
the new object

getInstantiable

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

setInstantiable

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