|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.openflow.protocol.factory.BasicFactory
public class BasicFactory
A basic OpenFlow factory that supports naive creation of both Messages and Actions.
Constructor Summary | |
---|---|
protected |
BasicFactory()
|
Method Summary | |
---|---|
OFAction |
getAction(OFActionType t)
Retrieves an OFAction instance corresponding to the specified OFActionType |
OFActionFactory |
getActionFactory()
Retrieves an OFActionFactory |
OFHelloElement |
getHelloElement(OFHelloElementType t)
Retrieves an OFHelloElement instance corresponding to the specified OFHelloElementType |
static BasicFactory |
getInstance()
|
OFInstruction |
getInstruction(OFInstructionType t)
Retrieves an OFInstruction instance corresponding to the specified OFInstructionType |
OFInstructionFactory |
getInstructionFactory()
Retrieves an OFInstructionFactory |
OFMessage |
getMessage(OFType t)
create and return a new instance of a message for OFType t. |
OFMeterBand |
getMeterBand(OFMeterBandType t)
Retrieves an OFMeterBand instance corresponding to the specified OFMeterBandType |
OFQueueProperty |
getQueueProperty(OFQueuePropertyType t)
Retrieves an OFQueueProperty instance corresponding to the specified OFQueuePropertyType |
OFStatistics |
getStatistics(OFType t,
OFStatisticsType st)
Retrieves an OFStatistics instance corresponding to the specified OFStatisticsType |
OFTableFeaturesProperty |
getTableFeaturesProperty(OFTableFeaturesPropertyType t)
Retrieves an OFTableFeaturesProperty instance corresponding to the specified OFTableFeaturesPropertyType |
protected void |
injectFactories(OFMessage ofm)
|
java.util.List<OFAction> |
parseActions(java.nio.ByteBuffer 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. |
java.util.List<OFAction> |
parseActions(java.nio.ByteBuffer 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. |
java.util.List<OFHelloElement> |
parseHelloElements(java.nio.ByteBuffer data,
int length)
Attempts to parse and return all OFHelloElement contained in the given ByteBuffer, beginning at the ByteBuffer's position, and ending at position+length. |
java.util.List<OFHelloElement> |
parseHelloElements(java.nio.ByteBuffer data,
int length,
int limit)
Attempts to parse and return all OFHelloElement 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)
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. |
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. |
java.util.List<OFMeterBand> |
parseMeterBands(java.nio.ByteBuffer data,
int length)
Attempts to parse and return all OFMeterBands contained in the given ByteBuffer, beginning at the ByteBuffer's position, and ending at position+length. |
java.util.List<OFMeterBand> |
parseMeterBands(java.nio.ByteBuffer data,
int length,
int limit)
Attempts to parse and return all OFMeterBands contained in the given ByteBuffer, beginning at the ByteBuffer's position, and ending at position+length. |
java.util.List<OFQueueProperty> |
parseQueueProperties(java.nio.ByteBuffer data,
int length)
Attempts to parse and return all OFQueueProperties contained in the given ByteBuffer, beginning at the ByteBuffer's position, and ending at position+length. |
java.util.List<OFQueueProperty> |
parseQueueProperties(java.nio.ByteBuffer data,
int length,
int limit)
Attempts to parse and return all OFQueueProperties contained in the given ByteBuffer, beginning at the ByteBuffer's position, and ending at position+length. |
java.util.List<OFStatistics> |
parseStatistics(OFType t,
OFStatisticsType st,
java.nio.ByteBuffer 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. |
java.util.List<OFStatistics> |
parseStatistics(OFType t,
OFStatisticsType st,
java.nio.ByteBuffer 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. |
java.util.List<OFTableFeaturesProperty> |
parseTableFeaturesProperties(java.nio.ByteBuffer data,
int length)
Attempts to parse and return all OFTableFeaturesProperties contained in the given ByteBuffer, beginning at the ByteBuffer's position, and ending at position+length. |
java.util.List<OFTableFeaturesProperty> |
parseTableFeaturesProperties(java.nio.ByteBuffer data,
int length,
int limit)
Attempts to parse and return all OFTableFeaturesProperties contained in the given ByteBuffer, beginning at the ByteBuffer's position, and ending at position+length. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
protected BasicFactory()
Method Detail |
---|
public static BasicFactory getInstance()
public OFMessage getMessage(OFType t)
getMessage
in interface OFMessageFactory
t
- the type of the OFMessage to be retrieved
public java.util.List<OFMessage> parseMessages(java.nio.ByteBuffer data)
OFMessageFactory
parseMessages
in interface OFMessageFactory
data
- the ByteBuffer to parse for an OpenFlow message
public java.util.List<OFMessage> parseMessages(java.nio.ByteBuffer data, int limit)
OFMessageFactory
parseMessages
in interface OFMessageFactory
data
- the ByteBuffer to parse for an OpenFlow messagelimit
- the maximum number of messages to return, 0 means no limit
protected void injectFactories(OFMessage ofm)
public OFAction getAction(OFActionType t)
OFActionFactory
getAction
in interface OFActionFactory
t
- the type of the OFAction to be retrieved
public java.util.List<OFAction> parseActions(java.nio.ByteBuffer data, int length)
OFActionFactory
parseActions
in interface OFActionFactory
data
- the ByteBuffer to parse for OpenFlow actionslength
- the number of Bytes to examine for OpenFlow actions
public java.util.List<OFAction> parseActions(java.nio.ByteBuffer data, int length, int limit)
OFActionFactory
parseActions
in interface OFActionFactory
data
- the ByteBuffer to parse for OpenFlow actionslength
- the number of Bytes to examine for OpenFlow actionslimit
- the maximum number of messages to return, 0 means no limit
public OFActionFactory getActionFactory()
OFInstructionFactory
getActionFactory
in interface OFInstructionFactory
public OFInstruction getInstruction(OFInstructionType t)
OFInstructionFactory
getInstruction
in interface OFInstructionFactory
t
- the type of the OFInstruction to be retrieved
public java.util.List<OFInstruction> parseInstructions(java.nio.ByteBuffer data, int length)
OFInstructionFactory
parseInstructions
in interface OFInstructionFactory
data
- the ByteBuffer to parse for OpenFlow instructionslength
- the number of Bytes to examine for OpenFlow instructions
public java.util.List<OFInstruction> parseInstructions(java.nio.ByteBuffer data, int length, int limit)
OFInstructionFactory
parseInstructions
in interface OFInstructionFactory
data
- the ByteBuffer to parse for OpenFlow instructionslength
- the number of Bytes to examine for OpenFlow instructionslimit
- the maximum number of messages to return, 0 means no limit
public OFInstructionFactory getInstructionFactory()
OFMessageFactory
getInstructionFactory
in interface OFMessageFactory
public OFStatistics getStatistics(OFType t, OFStatisticsType st)
OFStatisticsFactory
getStatistics
in interface OFStatisticsFactory
t
- the type of the containing OFMessage, only accepts statistics
request or replyst
- the type of the OFStatistics to be retrieved
public java.util.List<OFStatistics> parseStatistics(OFType t, OFStatisticsType st, java.nio.ByteBuffer data, int length)
OFStatisticsFactory
parseStatistics
in interface OFStatisticsFactory
t
- the type of the containing OFMessage, only accepts statistics
request or replyst
- the type of the OFStatistics to be retrieveddata
- the ByteBuffer to parse for OpenFlow Statisticslength
- the number of Bytes to examine for OpenFlow Statistics
public java.util.List<OFStatistics> parseStatistics(OFType t, OFStatisticsType st, java.nio.ByteBuffer data, int length, int limit)
OFStatisticsFactory
parseStatistics
in interface OFStatisticsFactory
t
- OFMessage type: should be one of stats_request or stats_replyst
- type of this statistics message, e.g., DESC, TABLEdata
- buffer to read fromlength
- length of recordslimit
- number of records to grab; 0 == all
public OFQueueProperty getQueueProperty(OFQueuePropertyType t)
OFQueuePropertyFactory
getQueueProperty
in interface OFQueuePropertyFactory
t
- the type of the OFQueueProperty to be retrieved
public java.util.List<OFQueueProperty> parseQueueProperties(java.nio.ByteBuffer data, int length)
OFQueuePropertyFactory
parseQueueProperties
in interface OFQueuePropertyFactory
data
- the ByteBuffer to parse for OpenFlow OFQueuePropertieslength
- the number of Bytes to examine for OpenFlow OFQueueProperties
public java.util.List<OFQueueProperty> parseQueueProperties(java.nio.ByteBuffer data, int length, int limit)
OFQueuePropertyFactory
parseQueueProperties
in interface OFQueuePropertyFactory
data
- the ByteBuffer to parse for OpenFlow OFQueuePropertieslength
- the number of Bytes to examine for OpenFlow OFQueuePropertieslimit
- the maximum number of OFQueueProperties to return, 0 means no limit
public OFHelloElement getHelloElement(OFHelloElementType t)
OFHelloElementFactory
getHelloElement
in interface OFHelloElementFactory
t
- the type of the OFHelloElement to be retrieved
public java.util.List<OFHelloElement> parseHelloElements(java.nio.ByteBuffer data, int length)
OFHelloElementFactory
parseHelloElements
in interface OFHelloElementFactory
data
- the ByteBuffer to parse for OpenFlow helloslength
- the number of Bytes to examine for OpenFlow hellos
public java.util.List<OFHelloElement> parseHelloElements(java.nio.ByteBuffer data, int length, int limit)
OFHelloElementFactory
parseHelloElements
in interface OFHelloElementFactory
data
- the ByteBuffer to parse for OpenFlow helloslength
- the number of Bytes to examine for OpenFlow helloslimit
- the maximum number of messages to return, 0 means no limit
public OFMeterBand getMeterBand(OFMeterBandType t)
OFMeterBandFactory
getMeterBand
in interface OFMeterBandFactory
t
- the type of the OFMeterBand to be retrieved
public java.util.List<OFMeterBand> parseMeterBands(java.nio.ByteBuffer data, int length)
OFMeterBandFactory
parseMeterBands
in interface OFMeterBandFactory
data
- the ByteBuffer to parse for OpenFlow OFMeterBandslength
- the number of Bytes to examine for OpenFlow OFMeterBands
public java.util.List<OFMeterBand> parseMeterBands(java.nio.ByteBuffer data, int length, int limit)
OFMeterBandFactory
parseMeterBands
in interface OFMeterBandFactory
data
- the ByteBuffer to parse for OpenFlow OFMeterBandslength
- the number of Bytes to examine for OpenFlow OFMeterBandslimit
- the maximum number of OFMeterBands to return, 0 means no limit
public OFTableFeaturesProperty getTableFeaturesProperty(OFTableFeaturesPropertyType t)
OFTableFeaturesPropertyFactory
getTableFeaturesProperty
in interface OFTableFeaturesPropertyFactory
t
- the type of the OFTableFeaturesProperty to be retrieved
public java.util.List<OFTableFeaturesProperty> parseTableFeaturesProperties(java.nio.ByteBuffer data, int length)
OFTableFeaturesPropertyFactory
parseTableFeaturesProperties
in interface OFTableFeaturesPropertyFactory
data
- the ByteBuffer to parse for OpenFlow OFTableFeaturesPropertieslength
- the number of Bytes to examine for OpenFlow OFTableFeaturesProperties
public java.util.List<OFTableFeaturesProperty> parseTableFeaturesProperties(java.nio.ByteBuffer data, int length, int limit)
OFTableFeaturesPropertyFactory
parseTableFeaturesProperties
in interface OFTableFeaturesPropertyFactory
data
- the ByteBuffer to parse for OpenFlow OFTableFeaturesPropertieslength
- the number of Bytes to examine for OpenFlow OFTableFeaturesPropertieslimit
- the maximum number of OFTableFeaturesProperties to return, 0 means no limit
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |