public class TableFeatureFactory extends AbstractFactory
table feature properties
.Modifier and Type | Method and Description |
---|---|
static TableFeaturePropAction |
createActionProp(ProtocolVersion pv,
TableFeaturePropType type,
Set<ActionType> actionTypes)
Creates a table features action property, for the given
protocol version, and the specified action types.
|
static TableFeaturePropAction |
createActionProp(ProtocolVersion pv,
TableFeaturePropType type,
Set<ActionType> actionTypes,
List<ActExperimenter> actionExper)
Creates a table features action property, for the given
protocol version, and the specified action types and experimenter
action types.
|
static TableFeaturePropExper |
createExperProp(ProtocolVersion pv,
TableFeaturePropType type,
ExperimenterId eid,
long expDefType,
byte[] data)
Creates a table features experimenter property, for the given
protocol version, and the specified experimenter data.
|
static TableFeaturePropExper |
createExperProp(ProtocolVersion pv,
TableFeaturePropType type,
int id,
long expDefType,
byte[] data)
Creates a table features experimenter property, for the given
protocol version, and the specified experimenter data.
|
static TableFeaturePropInstr |
createInstrProp(ProtocolVersion pv,
TableFeaturePropType type,
Set<InstructionType> ins)
Creates a table features instructions property, for the given
protocol version, indicating support for the specified instruction
types.
|
static TableFeaturePropInstr |
createInstrProp(ProtocolVersion pv,
TableFeaturePropType type,
Set<InstructionType> ins,
List<InstrExperimenter> insExp)
Creates a table features instructions property, for the given
protocol version, indicating support for the specified instruction
types, as well as the specified experimenter instructions.
|
static TableFeaturePropNextTable |
createNextTablesProp(ProtocolVersion pv,
TableFeaturePropType type,
Set<TableId> tableIds)
Creates a table features next-tables property, for the given
protocol version, and the specified table IDs.
|
static TableFeaturePropOxm |
createOxmProp(ProtocolVersion pv,
TableFeaturePropType type,
Map<OxmBasicFieldType,Boolean> fields)
Creates a table features OXM property, for the given
protocol version, and the specified match fields.
|
static TableFeaturePropOxm |
createOxmProp(ProtocolVersion pv,
TableFeaturePropType type,
Map<OxmBasicFieldType,Boolean> fields,
List<MFieldExperimenter> expFields)
Creates a table features OXM property, for the given
protocol version, and the specified match fields.
|
static void |
encodeProp(ProtocolVersion pv,
TableFeatureProp prop,
OfPacketWriter pkt)
Encodes a table feature property, writing it into the supplied buffer.
|
static void |
encodePropList(ProtocolVersion pv,
List<TableFeatureProp> props,
OfPacketWriter pkt)
Encodes a list of table feature properties, writing them into the
supplied buffer.
|
static int |
getPropLength(TableFeatureProp prop)
Returns the length of the table feature property in bytes, when
encoded.
|
static List<TableFeatureProp> |
parsePropList(int targetRi,
OfPacketReader pkt,
ProtocolVersion pv)
Parses a list of Table Feature properties from the supplied buffer.
|
protected String |
tag()
Returns an identifying tag for the table feature factory.
|
static String |
toDebugString(int indent,
List<TableFeatureProp> props)
Outputs a list of table feature properties in debug string format.
|
static String |
toDebugString(List<TableFeatureProp> props)
Outputs a list of table feature properties in debug string format.
|
mpe, mpe, mpe, mpe
protected String tag()
tag
in class AbstractFactory
public static List<TableFeatureProp> parsePropList(int targetRi, OfPacketReader pkt, ProtocolVersion pv) throws MessageParseException
Note that this method causes the reader index of the underlying
PacketBuffer
to be advanced by the length of the list, which
should leave the read index at targetRi
.
This method delegates to parseProp(com.hp.of.lib.OfPacketReader, com.hp.of.lib.ProtocolVersion)
for each individual
property.
targetRi
- the target reader indexpkt
- the data bufferpv
- the protocol versionMessageParseException
- if a problem parsing the bufferVersionMismatchException
- if version is < 1.3public static TableFeaturePropInstr createInstrProp(ProtocolVersion pv, TableFeaturePropType type, Set<InstructionType> ins)
The type
parameter should be one of:
pv
- the protocol versiontype
- the type of propertyins
- supported instructionsVersionNotSupportedException
- if the version is not supportedNullPointerException
- if any required parameter is nullIllegalArgumentException
- if type is inappropriatepublic static TableFeaturePropInstr createInstrProp(ProtocolVersion pv, TableFeaturePropType type, Set<InstructionType> ins, List<InstrExperimenter> insExp)
The type
parameter should be one of:
pv
- the protocol versiontype
- the type of propertyins
- supported instructionsinsExp
- supported experimenter instructionsVersionNotSupportedException
- if the version is not supportedNullPointerException
- if any required parameter is nullIllegalArgumentException
- if type is inappropriatepublic static TableFeaturePropNextTable createNextTablesProp(ProtocolVersion pv, TableFeaturePropType type, Set<TableId> tableIds)
The type
parameter should be one of:
pv
- the protocol versiontype
- the type of propertytableIds
- the table IDsVersionNotSupportedException
- if the version is not supportedNullPointerException
- if any required parameter is nullIllegalArgumentException
- if type is inappropriatepublic static TableFeaturePropAction createActionProp(ProtocolVersion pv, TableFeaturePropType type, Set<ActionType> actionTypes)
The type
parameter should be one of:
pv
- the protocol versiontype
- the type of propertyactionTypes
- the supported action typesVersionNotSupportedException
- if the version is not supportedNullPointerException
- if any required parameter is nullIllegalArgumentException
- if type is inappropriatepublic static TableFeaturePropAction createActionProp(ProtocolVersion pv, TableFeaturePropType type, Set<ActionType> actionTypes, List<ActExperimenter> actionExper)
The type
parameter should be one of:
pv
- the protocol versiontype
- the type of propertyactionTypes
- the supported action typesactionExper
- the supported experimenter actionsVersionNotSupportedException
- if the version is not supportedNullPointerException
- if any required parameter is nullIllegalArgumentException
- if type is inappropriatepublic static TableFeaturePropOxm createOxmProp(ProtocolVersion pv, TableFeaturePropType type, Map<OxmBasicFieldType,Boolean> fields)
The type
parameter should be one of:
pv
- the protocol versiontype
- the type of propertyfields
- the supported basic fields, and whether they are maskableVersionNotSupportedException
- if the version is not supportedNullPointerException
- if any required parameter is nullIllegalArgumentException
- if type is inappropriatepublic static TableFeaturePropOxm createOxmProp(ProtocolVersion pv, TableFeaturePropType type, Map<OxmBasicFieldType,Boolean> fields, List<MFieldExperimenter> expFields)
The type
parameter should be one of:
pv
- the protocol versiontype
- the type of propertyfields
- the supported basic fields, and whether they are maskableexpFields
- the supported experimenter fieldsVersionNotSupportedException
- if the version is not supportedNullPointerException
- if any required parameter is nullIllegalArgumentException
- if type is inappropriatepublic static TableFeaturePropExper createExperProp(ProtocolVersion pv, TableFeaturePropType type, ExperimenterId eid, long expDefType, byte[] data)
The type
parameter should be one of:
pv
- the protocol versiontype
- the type of propertyeid
- the experimenter IDexpDefType
- the experimenter defined typedata
- the experimenter defined dataVersionNotSupportedException
- if the version is not supportedNullPointerException
- if any required parameter is nullIllegalArgumentException
- if type is inappropriatepublic static TableFeaturePropExper createExperProp(ProtocolVersion pv, TableFeaturePropType type, int id, long expDefType, byte[] data)
The type
parameter should be one of:
pv
- the protocol versiontype
- the type of propertyid
- the encoded experimenter IDexpDefType
- the experimenter defined typedata
- the experimenter defined dataVersionNotSupportedException
- if the version is not supportedNullPointerException
- if any required parameter is nullIllegalArgumentException
- if type is inappropriatepublic static void encodePropList(ProtocolVersion pv, List<TableFeatureProp> props, OfPacketWriter pkt)
PacketBuffer
to be advanced by the length of all the
written properties.pv
- the protocol versionprops
- the propertiespkt
- the buffer into which the properties should be writtenpublic static void encodeProp(ProtocolVersion pv, TableFeatureProp prop, OfPacketWriter pkt)
PacketBuffer
to be advanced by the length of the property.pv
- the protocol versionprop
- the propertypkt
- the buffer into which the property is to be writtenpublic static int getPropLength(TableFeatureProp prop)
prop
- the propertypublic static String toDebugString(List<TableFeatureProp> props)
props
- the list of propertiespublic static String toDebugString(int indent, List<TableFeatureProp> props)
indent
- the additional indent (number of spaces)props
- the list of propertiesCopyright © 2016. All Rights Reserved.