org.openflow.protocol.factory
Interface OFMessageFactory

All Known Implementing Classes:
BasicFactory, FloodlightFactory

public interface OFMessageFactory

The interface to factories used for retrieving OFMessage instances. All methods are expected to be thread-safe.

Author:
David Erickson (daviderickson@cs.stanford.edu)

Method Summary
 OFInstructionFactory getInstructionFactory()
          Retrieves an OFInstructionFactory
 OFMessage getMessage(OFType t)
          Retrieves an OFMessage instance corresponding to the specified OFType
 java.util.List<OFMessage> parseMessages(java.nio.ByteBuffer data)
          Attempts to parse and return all OFMessages contained in the given ByteBuffer, beginning at the ByteBuffer's position, and ending at the ByteBuffer's limit.
 java.util.List<OFMessage> parseMessages(java.nio.ByteBuffer data, int limit)
          Attempts to parse and return all OFMessages contained in the given ByteBuffer, beginning at the ByteBuffer's position, and ending at the ByteBuffer's limit.
 

Method Detail

getMessage

OFMessage getMessage(OFType t)
Retrieves an OFMessage instance corresponding to the specified OFType

Parameters:
t - the type of the OFMessage to be retrieved
Returns:
an OFMessage instance

parseMessages

java.util.List<OFMessage> parseMessages(java.nio.ByteBuffer data)
Attempts to parse and return all OFMessages contained in the given ByteBuffer, beginning at the ByteBuffer's position, and ending at the ByteBuffer's limit.

Parameters:
data - the ByteBuffer to parse for an OpenFlow message
Returns:
a list of OFMessage instances

parseMessages

java.util.List<OFMessage> parseMessages(java.nio.ByteBuffer data,
                                        int limit)
Attempts to parse and return all OFMessages contained in the given ByteBuffer, beginning at the ByteBuffer's position, and ending at the ByteBuffer's limit.

Parameters:
data - the ByteBuffer to parse for an OpenFlow message
limit - the maximum number of messages to return, 0 means no limit
Returns:
a list of OFMessage instances

getInstructionFactory

OFInstructionFactory getInstructionFactory()
Retrieves an OFInstructionFactory

Returns:
an OFInstructionFactory