public class BasicFactory extends Object implements OFMessageFactory, OFActionFactory, OFStatisticsFactory, OFVendorDataFactory
| Modifier and Type | Field and Description |
|---|---|
protected static BasicFactory |
instance |
| Modifier | Constructor and Description |
|---|---|
protected |
BasicFactory() |
| Modifier and Type | Method and Description |
|---|---|
static String |
dumpBuffer(org.jboss.netty.buffer.ChannelBuffer data) |
OFAction |
getAction(OFActionType t)
Retrieves an OFAction instance corresponding to the specified
OFActionType
|
OFActionFactory |
getActionFactory()
Retrieves an OFActionFactory
|
static BasicFactory |
getInstance() |
OFMessage |
getMessage(OFType t)
create and return a new instance of a message for OFType t.
|
OFStatistics |
getStatistics(OFType t,
OFStatisticsType st)
Retrieves an OFStatistics instance corresponding to the specified
OFStatisticsType
|
OFVendorData |
getVendorData(OFVendorId vendorId,
OFVendorDataType vendorDataType)
Retrieves an OFVendorData instance corresponding to the specified
OFVendorId and OFVendorDataType.
|
List<OFAction> |
parseActions(org.jboss.netty.buffer.ChannelBuffer data,
int length)
Attempts to parse and return all OFActions contained in the given
ByteBuffer, beginning at the ByteBuffer's position, and ending at
position+length.
|
List<OFAction> |
parseActions(org.jboss.netty.buffer.ChannelBuffer data,
int length,
int limit)
Attempts to parse and return all OFActions contained in the given
ByteBuffer, beginning at the ByteBuffer's position, and ending at
position+length.
|
List<OFMessage> |
parseMessage(org.jboss.netty.buffer.ChannelBuffer data)
Attempts to parse and return a OFMessages contained in the given
ChannelBuffer, beginning at the ChannelBuffer's position, and ending at
the after the first parsed message
|
OFMessage |
parseMessageOne(org.jboss.netty.buffer.ChannelBuffer data) |
List<OFStatistics> |
parseStatistics(OFType t,
OFStatisticsType st,
org.jboss.netty.buffer.ChannelBuffer data,
int length)
Attempts to parse and return all OFStatistics contained in the given
ByteBuffer, beginning at the ByteBuffer's position, and ending at
position+length.
|
List<OFStatistics> |
parseStatistics(OFType t,
OFStatisticsType st,
org.jboss.netty.buffer.ChannelBuffer data,
int length,
int limit)
Attempts to parse and return all OFStatistics contained in the given
ByteBuffer, beginning at the ByteBuffer's position, and ending at
position+length.
|
OFVendorData |
parseVendorData(int vendor,
org.jboss.netty.buffer.ChannelBuffer data,
int length)
Attempts to parse and return the OFVendorData contained in the given
ChannelBuffer, beginning right after the vendor id.
|
protected static BasicFactory instance
public static BasicFactory getInstance()
public OFMessage getMessage(OFType t)
getMessage in interface OFMessageFactoryt - the type of the OFMessage to be retrievedpublic List<OFMessage> parseMessage(org.jboss.netty.buffer.ChannelBuffer data) throws MessageParseException
OFMessageFactoryparseMessage in interface OFMessageFactorydata - the ChannelBuffer to parse for an OpenFlow messageMessageParseExceptionpublic OFMessage parseMessageOne(org.jboss.netty.buffer.ChannelBuffer data) throws MessageParseException
MessageParseExceptionpublic OFAction getAction(OFActionType t)
OFActionFactorygetAction in interface OFActionFactoryt - the type of the OFAction to be retrievedpublic List<OFAction> parseActions(org.jboss.netty.buffer.ChannelBuffer data, int length)
OFActionFactoryparseActions in interface OFActionFactorydata - the ChannelBuffer to parse for OpenFlow actionslength - the number of Bytes to examine for OpenFlow actionspublic List<OFAction> parseActions(org.jboss.netty.buffer.ChannelBuffer data, int length, int limit)
OFActionFactoryparseActions in interface OFActionFactorydata - the ChannelBuffer to parse for OpenFlow actionslength - the number of Bytes to examine for OpenFlow actionslimit - the maximum number of messages to return, 0 means no limitpublic OFActionFactory getActionFactory()
OFMessageFactorygetActionFactory in interface OFMessageFactorypublic OFStatistics getStatistics(OFType t, OFStatisticsType st)
OFStatisticsFactorygetStatistics in interface OFStatisticsFactoryt - the type of the containing OFMessage, only accepts statistics
request or replyst - the type of the OFStatistics to be retrievedpublic List<OFStatistics> parseStatistics(OFType t, OFStatisticsType st, org.jboss.netty.buffer.ChannelBuffer data, int length)
OFStatisticsFactoryparseStatistics in interface OFStatisticsFactoryt - the type of the containing OFMessage, only accepts statistics
request or replyst - the type of the OFStatistics to be retrieveddata - the ChannelBuffer to parse for OpenFlow Statisticslength - the number of Bytes to examine for OpenFlow Statisticspublic List<OFStatistics> parseStatistics(OFType t, OFStatisticsType st, org.jboss.netty.buffer.ChannelBuffer data, int length, int limit)
OFStatisticsFactoryparseStatistics in interface OFStatisticsFactoryt - OFMessage type: should be one of stats_request or stats_replyst - statistics type of this message, e.g., DESC, TABLEdata - buffer to read fromlength - length of statisticslimit - number of statistics to grab; 0 == allpublic OFVendorData getVendorData(OFVendorId vendorId, OFVendorDataType vendorDataType)
OFVendorDataFactorygetVendorData in interface OFVendorDataFactoryvendorId - the vendorId of the containing OFVendor messagevendorDataType - the type of the OFVendorData to be retrievedpublic OFVendorData parseVendorData(int vendor, org.jboss.netty.buffer.ChannelBuffer data, int length)
parseVendorData in interface OFVendorDataFactoryvendor - the vendor id that was parsed from the OFVendor message.data - the ChannelBuffer from which to parse the vendor datalength - the length to the end of the enclosing message.public static String dumpBuffer(org.jboss.netty.buffer.ChannelBuffer data)
Copyright © 2015. All rights reserved.