org.openflow.protocol.factory
Interface OFInstructionFactory

All Known Implementing Classes:
BasicFactory, FloodlightFactory

public interface OFInstructionFactory

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

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

Method Summary
 OFActionFactory getActionFactory()
          Retrieves an OFActionFactory
 OFInstruction getInstruction(OFInstructionType t)
          Retrieves an OFInstruction instance corresponding to the specified OFInstructionType
 java.util.List<OFInstruction> parseInstructions(java.nio.ByteBuffer data, int length)
          Attempts to parse and return all OFInstruction contained in the given ByteBuffer, beginning at the ByteBuffer's position, and ending at position+length.
 java.util.List<OFInstruction> parseInstructions(java.nio.ByteBuffer data, int length, int limit)
          Attempts to parse and return all OFInstruction contained in the given ByteBuffer, beginning at the ByteBuffer's position, and ending at position+length.
 

Method Detail

getInstruction

OFInstruction getInstruction(OFInstructionType t)
Retrieves an OFInstruction instance corresponding to the specified OFInstructionType

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

parseInstructions

java.util.List<OFInstruction> parseInstructions(java.nio.ByteBuffer data,
                                                int length)
Attempts to parse and return all OFInstruction contained in the given ByteBuffer, beginning at the ByteBuffer's position, and ending at position+length.

Parameters:
data - the ByteBuffer to parse for OpenFlow instructions
length - the number of Bytes to examine for OpenFlow instructions
Returns:
a list of OFInstruction instances

parseInstructions

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

Parameters:
data - the ByteBuffer to parse for OpenFlow instructions
length - the number of Bytes to examine for OpenFlow instructions
limit - the maximum number of messages to return, 0 means no limit
Returns:
a list of OFInstruction instances

getActionFactory

OFActionFactory getActionFactory()
Retrieves an OFActionFactory

Returns:
an OFActionFactory