org.openflow.protocol
Enum OFType

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

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

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

Author:
Rob Sherwood (rob.sherwood@stanford.edu), David Erickson (daviderickson@cs.stanford.edu)

Enum Constant Summary
BARRIER_REPLY
           
BARRIER_REQUEST
           
ECHO_REPLY
           
ECHO_REQUEST
           
ERROR
           
FEATURES_REPLY
           
FEATURES_REQUEST
           
FLOW_MOD
           
FLOW_REMOVED
           
GET_CONFIG_REPLY
           
GET_CONFIG_REQUEST
           
GROUP_MOD
           
HELLO
           
METER_MOD
           
PACKET_IN
           
PACKET_OUT
           
PORT_MOD
           
PORT_STATUS
           
QUEUE_GET_CONFIG_REPLY
           
QUEUE_GET_CONFIG_REQUEST
           
ROLE_REPLY
           
ROLE_REQUEST
           
SET_CONFIG
           
STATS_REPLY
           
STATS_REQUEST
           
TABLE_MOD
           
VENDOR
           
 
Field Summary
protected  java.lang.Class<? extends OFMessage> clazz
           
protected  java.lang.reflect.Constructor<? extends OFMessage> constructor
           
protected  Instantiable<OFMessage> instantiable
           
protected static org.slf4j.Logger log
           
protected  byte type
           
 
Method Summary
static void addMapping(byte i, OFType t)
          Adds a mapping from type value to OFType enum
 java.lang.reflect.Constructor<? extends OFMessage> getConstructor()
          Returns the no-argument Constructor of the implementation class for this OFType
 Instantiable<OFMessage> getInstantiable()
           
 byte getTypeValue()
           
 OFMessage newInstance()
          Returns a new instance of the OFMessage represented by this OFType
static void removeMapping(byte i)
          Remove a mapping from type value to OFType enum
 void setInstantiable(Instantiable<OFMessage> instantiable)
           
 java.lang.Class<? extends OFMessage> toClass()
           
static OFType valueOf(java.lang.Byte i)
          Given a wire protocol OpenFlow type number, return the OFType associated with it
static OFType valueOf(java.lang.String name)
          Returns the enum constant of this type with the specified name.
static OFType[] 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

HELLO

public static final OFType HELLO

ERROR

public static final OFType ERROR

ECHO_REQUEST

public static final OFType ECHO_REQUEST

ECHO_REPLY

public static final OFType ECHO_REPLY

VENDOR

public static final OFType VENDOR

FEATURES_REQUEST

public static final OFType FEATURES_REQUEST

FEATURES_REPLY

public static final OFType FEATURES_REPLY

GET_CONFIG_REQUEST

public static final OFType GET_CONFIG_REQUEST

GET_CONFIG_REPLY

public static final OFType GET_CONFIG_REPLY

SET_CONFIG

public static final OFType SET_CONFIG

PACKET_IN

public static final OFType PACKET_IN

FLOW_REMOVED

public static final OFType FLOW_REMOVED

PORT_STATUS

public static final OFType PORT_STATUS

PACKET_OUT

public static final OFType PACKET_OUT

FLOW_MOD

public static final OFType FLOW_MOD

GROUP_MOD

public static final OFType GROUP_MOD

PORT_MOD

public static final OFType PORT_MOD

TABLE_MOD

public static final OFType TABLE_MOD

STATS_REQUEST

public static final OFType STATS_REQUEST

STATS_REPLY

public static final OFType STATS_REPLY

BARRIER_REQUEST

public static final OFType BARRIER_REQUEST

BARRIER_REPLY

public static final OFType BARRIER_REPLY

QUEUE_GET_CONFIG_REQUEST

public static final OFType QUEUE_GET_CONFIG_REQUEST

QUEUE_GET_CONFIG_REPLY

public static final OFType QUEUE_GET_CONFIG_REPLY

ROLE_REQUEST

public static final OFType ROLE_REQUEST

ROLE_REPLY

public static final OFType ROLE_REPLY

METER_MOD

public static final OFType METER_MOD
Field Detail

log

protected static org.slf4j.Logger log

clazz

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

constructor

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

instantiable

protected Instantiable<OFMessage> instantiable

type

protected byte type
Method Detail

values

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

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

valueOf

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

Parameters:
i - OpenFlow wire protocol type
t - type

removeMapping

public static void removeMapping(byte i)
Remove a mapping from type value to OFType enum

Parameters:
i - OpenFlow wire protocol type

valueOf

public static OFType valueOf(java.lang.Byte i)
Given a wire protocol OpenFlow type number, return the OFType associated with it

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

getTypeValue

public byte getTypeValue()
Returns:
Returns the wire protocol value corresponding to this OFType

toClass

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

getConstructor

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

Returns:
the constructor

newInstance

public OFMessage newInstance()
Returns a new instance of the OFMessage represented by this OFType

Returns:
the new object

getInstantiable

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

setInstantiable

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