org.openflow.gui.net.protocol
Enum OFGMessageType

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

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

Enumerates what types of messages are in the OpenFlow GUI protocol.

Author:
David Underhill

Enum Constant Summary
AUTH_REPLY
          Authentication reply
AUTH_REQUEST
          Authentication request
AUTH_STATUS
          Information about whether a user has been authenticated
DISCONNECT
          Disconnection message
ECHO_REPLY
          reply to an echo request (keep-alive)
ECHO_REQUEST
          request for an echo reply (keep-alive)
FLOWS_ADD
          List of flows to add.
FLOWS_DELETE
          List of flows to delete.
FLOWS_REQUEST
          Query for flows
LINKS_ADD
          Reply with list of links added.
LINKS_DELETE
          Reply with list of links deleted.
LINKS_REQUEST
          Query of links
NODES_ADD
          Reply with list of nodes added.
NODES_DELETE
          Reply with list of nodes deleted.
NODES_REQUEST
          Query for nodes
POLL_START
          Tell the backend to start polling a message
POLL_STOP
          Tell the backend to stop polling a message
STAT_REPLY
          Aggregated statistics reply.
STAT_REQUEST
          Statistics request.
 
Method Summary
static OFGMessage decode(int len, java.io.DataInput in)
          Constructs the object representing the received message.
 byte getTypeID()
          returns the special value used to identify this type
static OFGMessageType typeValToMessageType(byte typeID)
          Returns the OFGMessageType constant associated with typeID, if any
static OFGMessageType valueOf(java.lang.String name)
          Returns the enum constant of this type with the specified name.
static OFGMessageType[] 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

DISCONNECT

public static final OFGMessageType DISCONNECT
Disconnection message


AUTH_REQUEST

public static final OFGMessageType AUTH_REQUEST
Authentication request


AUTH_REPLY

public static final OFGMessageType AUTH_REPLY
Authentication reply


AUTH_STATUS

public static final OFGMessageType AUTH_STATUS
Information about whether a user has been authenticated


ECHO_REQUEST

public static final OFGMessageType ECHO_REQUEST
request for an echo reply (keep-alive)


ECHO_REPLY

public static final OFGMessageType ECHO_REPLY
reply to an echo request (keep-alive)


POLL_START

public static final OFGMessageType POLL_START
Tell the backend to start polling a message


POLL_STOP

public static final OFGMessageType POLL_STOP
Tell the backend to stop polling a message


NODES_REQUEST

public static final OFGMessageType NODES_REQUEST
Query for nodes


NODES_ADD

public static final OFGMessageType NODES_ADD
Reply with list of nodes added.


NODES_DELETE

public static final OFGMessageType NODES_DELETE
Reply with list of nodes deleted.


LINKS_REQUEST

public static final OFGMessageType LINKS_REQUEST
Query of links


LINKS_ADD

public static final OFGMessageType LINKS_ADD
Reply with list of links added. Body is array of book_link_spec.


LINKS_DELETE

public static final OFGMessageType LINKS_DELETE
Reply with list of links deleted. Body is array of book_link_spec.


FLOWS_REQUEST

public static final OFGMessageType FLOWS_REQUEST
Query for flows


FLOWS_ADD

public static final OFGMessageType FLOWS_ADD
List of flows to add.


FLOWS_DELETE

public static final OFGMessageType FLOWS_DELETE
List of flows to delete.


STAT_REQUEST

public static final OFGMessageType STAT_REQUEST
Statistics request. Body is book_stat_message, with osr_body as defined in OpenFlow for ofp_stats_request.


STAT_REPLY

public static final OFGMessageType STAT_REPLY
Aggregated statistics reply. Body is book_stat_message, with osr_body as defined for ofp_stats_reply in OpenFlow, with exception of ofp_desc_stats having ofp_switch_features appended.

Method Detail

values

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

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

valueOf

public static OFGMessageType 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 byte getTypeID()
returns the special value used to identify this type


typeValToMessageType

public static OFGMessageType typeValToMessageType(byte typeID)
Returns the OFGMessageType constant associated with typeID, if any


decode

public static OFGMessage decode(int len,
                                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 - 4 bytes representing the rest of the message should be extracted from buf.

Throws:
java.io.IOException