org.openflow.protocol
Class OFHello

java.lang.Object
  extended by org.openflow.protocol.OFMessage
      extended by org.openflow.protocol.OFHello
All Implemented Interfaces:
OFHelloElementFactoryAware

public class OFHello
extends OFMessage
implements OFHelloElementFactoryAware

Represents an ofp_hello message

Author:
Srini Seetharaman (srini.seetharaman@gmail.com)

Field Summary
protected  OFHelloElementFactory helloElementFactory
           
protected  java.util.List<OFHelloElement> helloElements
           
static int MINIMUM_LENGTH
           
 
Fields inherited from class org.openflow.protocol.OFMessage
length, OFP_VERSION, type, version, xid
 
Constructor Summary
OFHello()
          Construct a ofp_hello message
 
Method Summary
 void computeLength()
          This method is called during the writeTo method for serialization and is expected to set the length of the message.
 java.util.List<OFHelloElement> getHelloElements()
          Returns read-only copies of the hello elements contained in this Hello message
 void readFrom(java.nio.ByteBuffer data)
          Read this message off the wire from the specified ByteBuffer
 void setHelloElementFactory(OFHelloElementFactory helloElementFactory)
          Sets the OFHelloElementFactory
 OFHello setHelloElements(java.util.List<OFHelloElement> helloElements)
          Sets the list of hello elements this Hello message contains
 void writeTo(java.nio.ByteBuffer data)
          Write this message's binary format to the specified ByteBuffer
 
Methods inherited from class org.openflow.protocol.OFMessage
equals, getLength, getLengthU, getType, getVersion, getXid, hashCode, setLength, setLengthU, setType, setVersion, setXid, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

MINIMUM_LENGTH

public static int MINIMUM_LENGTH

helloElements

protected java.util.List<OFHelloElement> helloElements

helloElementFactory

protected OFHelloElementFactory helloElementFactory
Constructor Detail

OFHello

public OFHello()
Construct a ofp_hello message

Method Detail

setHelloElementFactory

public void setHelloElementFactory(OFHelloElementFactory helloElementFactory)
Description copied from interface: OFHelloElementFactoryAware
Sets the OFHelloElementFactory

Specified by:
setHelloElementFactory in interface OFHelloElementFactoryAware

getHelloElements

public java.util.List<OFHelloElement> getHelloElements()
Returns read-only copies of the hello elements contained in this Hello message

Returns:
a list of ordered Hello elements

setHelloElements

public OFHello setHelloElements(java.util.List<OFHelloElement> helloElements)
Sets the list of hello elements this Hello message contains

Parameters:
helloElements - a list of ordered Hello elements

readFrom

public void readFrom(java.nio.ByteBuffer data)
Description copied from class: OFMessage
Read this message off the wire from the specified ByteBuffer

Overrides:
readFrom in class OFMessage

writeTo

public void writeTo(java.nio.ByteBuffer data)
Description copied from class: OFMessage
Write this message's binary format to the specified ByteBuffer

Overrides:
writeTo in class OFMessage

computeLength

public void computeLength()
Description copied from class: OFMessage
This method is called during the writeTo method for serialization and is expected to set the length of the message. If your class manually sets the length you should override this to do nothing.

Overrides:
computeLength in class OFMessage