public class MatchFactory extends AbstractFactory
Match
instances.Modifier and Type | Method and Description |
---|---|
static MutableMatch |
createMatch(ProtocolVersion pv)
Creates a mutable match instance.
|
static void |
encodeMatch(Match match,
OfPacketWriter pkt)
Encodes a match, writing it into the supplied buffer.
|
static VId |
equivVid(VlanId vlanId)
Returns the VId instance equivalent to the specified Vlan ID.
|
static VlanId |
equivVlanId(VId vid)
Returns the VlanId instance equivalent to the specified VId.
|
static Match |
parseMatch(OfPacketReader pkt,
ProtocolVersion pv)
Parses a Match structure from the supplied buffer.
|
protected String |
tag()
Returns an identifying tag for the match factory.
|
mpe, mpe, mpe, mpe
protected String tag()
tag
in class AbstractFactory
public static Match parseMatch(OfPacketReader pkt, ProtocolVersion pv) throws MessageParseException
PacketBuffer
to be advanced by the length of the structure
(including the padding).pkt
- the data bufferpv
- the protocol versionMessageParseException
- if unable to parse the structurepublic static VId equivVid(VlanId vlanId)
vlanId
- the vlan IDNullPointerException
- if vlanId is nullpublic static VlanId equivVlanId(VId vid)
vid
- the VIdNullPointerException
- if vid is nullIllegalArgumentException
- if vid is out of range (not u12)public static MutableMatch createMatch(ProtocolVersion pv)
pv
- the protocol versionVersionNotSupportedException
- if the version is not supportedpublic static void encodeMatch(Match match, OfPacketWriter pkt)
PacketBuffer
to be advanced by the length of the match.match
- the matchpkt
- the buffer into which the match is to be writtenCopyright © 2016. All Rights Reserved.