org.openflow.gui.net.protocol
Class OFGMessage

java.lang.Object
  extended by org.openflow.gui.net.protocol.OFGMessage
All Implemented Interfaces:
Message<OFGMessageType>
Direct Known Subclasses:
AuthReply, AuthRequest, AuthStatus, FlowsList, LinksList, NodesList, PollStart, PollStop, Request, StatsHeader

public class OFGMessage
extends java.lang.Object
implements Message<OFGMessageType>

Header for OpenFlow GUI protocol messages.

Author:
David Underhill

Field Summary
static int SIZEOF
          size in bytes of a OFGMessage (when serialized)
 long timeCreated
          the time this message was created in this application
protected static java.lang.String TSSEP
          separator between two toString() operators
 OFGMessageType type
          type of this message
 int xid
          transaction id of this message, if any
 
Constructor Summary
OFGMessage(OFGMessageType t, int xid)
          used to construct a message
 
Method Summary
 OFGMessageType getType()
          gets the type associated with this class
 boolean isStatefulReply()
          returns whether this message is a reply to a stateful exchange (default=false)
 boolean isStatefulRequest()
          returns whether this message starts a stateful exchange (default=false)
 int length()
          total length of this message in bytes
 long timeCreated()
          Gets the time this message was created in this application
 java.lang.String toString()
          String representation of the message including the date and type.
 void write(java.io.DataOutput out)
          sends the message over the specified output stream
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

SIZEOF

public static final int SIZEOF
size in bytes of a OFGMessage (when serialized)

See Also:
Constant Field Values

TSSEP

protected static final java.lang.String TSSEP
separator between two toString() operators

See Also:
Constant Field Values

type

public OFGMessageType type
type of this message


xid

public int xid
transaction id of this message, if any


timeCreated

public long timeCreated
the time this message was created in this application

Constructor Detail

OFGMessage

public OFGMessage(OFGMessageType t,
                  int xid)
used to construct a message

Method Detail

length

public int length()
total length of this message in bytes


getType

public OFGMessageType getType()
gets the type associated with this class

Specified by:
getType in interface Message<OFGMessageType>

isStatefulRequest

public boolean isStatefulRequest()
returns whether this message starts a stateful exchange (default=false)


isStatefulReply

public boolean isStatefulReply()
returns whether this message is a reply to a stateful exchange (default=false)


write

public void write(java.io.DataOutput out)
           throws java.io.IOException
sends the message over the specified output stream

Throws:
java.io.IOException

timeCreated

public long timeCreated()
Gets the time this message was created in this application


toString

public java.lang.String toString()
String representation of the message including the date and type. Also includes the transaction ID if it is non-zero.

Overrides:
toString in class java.lang.Object