org.openflow.protocol
Enum StatsType

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

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

Enumerates what types of stats are in the OpenFlow protocol. Equivalent to the OFPST_* constants.

Author:
David Underhill

Enum Constant Summary
AGGREGATE
          Aggregate flow statistics
DESC
          Description of this OpenFlow switch
FLOW
          Individual flow stats
PORT
          Physical port statistics
TABLE
          Flow table statistics
VENDOR
          Vendor extension
 
Method Summary
static StatsHeader decode(int len, OFGMessageType t, int xid, java.io.DataInput in)
          Constructs the object representing the received message.
 short getTypeID()
          returns the special value used to identify this type
static StatsType typeValToStatsType(short typeID)
          Returns the OFGMessageType constant associated with typeID, if any
static StatsType valueOf(java.lang.String name)
          Returns the enum constant of this type with the specified name.
static StatsType[] 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

DESC

public static final StatsType DESC
Description of this OpenFlow switch


FLOW

public static final StatsType FLOW
Individual flow stats


AGGREGATE

public static final StatsType AGGREGATE
Aggregate flow statistics


TABLE

public static final StatsType TABLE
Flow table statistics


PORT

public static final StatsType PORT
Physical port statistics


VENDOR

public static final StatsType VENDOR
Vendor extension

Method Detail

values

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

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

valueOf

public static StatsType 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

getTypeID

public short getTypeID()
returns the special value used to identify this type


typeValToStatsType

public static StatsType typeValToStatsType(short typeID)
Returns the OFGMessageType constant associated with typeID, if any


decode

public static StatsHeader decode(int len,
                                 OFGMessageType t,
                                 int xid,
                                 java.io.DataInput in)
                          throws java.io.IOException
Constructs the object representing the received message. The message is known to be of length len and len - OFGMessage.SIZEOF bytes representing the rest of the message should be extracted from buf.

Throws:
java.io.IOException