public final class VTNEtherMatch extends Object
VTNEtherMatch describes the condition for ethernet header to match
against packets.
Note that this class is not synchronized.
| Constructor and Description |
|---|
VTNEtherMatch()
Construct a new instance that matches every packet.
|
VTNEtherMatch(EtherAddress src,
EtherAddress dst,
Integer type,
Integer vid,
Short pcp)
Construct a new instance.
|
VTNEtherMatch(org.opendaylight.yang.gen.v1.urn.opendaylight.model.match.types.rev131026.EthernetMatchFields ematch,
org.opendaylight.yang.gen.v1.urn.opendaylight.model.match.types.rev131026.VlanMatchFields vmatch)
Construct a new instance from the given
EthernetMatchFields and
VlanMatchFields instances. |
VTNEtherMatch(Integer type)
Construct a new instance that matches the given Ethernet type.
|
VTNEtherMatch(VtnEtherMatchFields vematch)
Construct a new instance from the given
VtnEtherMatchFields. |
| Modifier and Type | Method and Description |
|---|---|
static VTNEtherMatch |
create(org.opendaylight.yang.gen.v1.urn.opendaylight.model.match.types.rev131026.Match match)
Create a new instance from the given MD-SAL flow match.
|
boolean |
equals(Object o)
Determine whether the given object is identical to this object.
|
EtherAddress |
getDestinationAddress()
Return the destination MAC address to match against packets.
|
Integer |
getEtherType()
Return the ethernet type to match against packets.
|
EtherAddress |
getSourceAddress()
Return the source MAC address to match against packets.
|
Integer |
getVlanId()
Return the VLAN ID to match against packets.
|
Short |
getVlanPriority()
Return the VLAN priority to match against packets.
|
int |
hashCode()
Return the hash code of this object.
|
boolean |
isEmpty()
Determine whether this instance does not specify any Ethernet header
field or not.
|
boolean |
match(FlowMatchContext ctx)
Determine whether the given Ethernet header matches the condition
configured in this instance.
|
void |
setConditionKey(StringBuilder builder)
Store strings used to construct flow condition key.
|
void |
setEtherType(Integer type)
Set the ethernet type to match against packets.
|
void |
setMatch(org.opendaylight.yang.gen.v1.urn.opendaylight.flow.types.rev131026.flow.MatchBuilder builder)
Configure the condition represented by this instance into the given
MD-SAL flow match builder.
|
VtnEtherMatchBuilder |
toVtnEtherMatchBuilder()
Return a
VtnEtherMatchBuilder instance which contains the flow
conditions configured in this instance. |
void |
verify()
Verify the contents of this instance.
|
public VTNEtherMatch()
public VTNEtherMatch(Integer type)
type - An Integer instance whcih represents the ethernet
type to match against packets.
null matches every ethernet type.public VTNEtherMatch(EtherAddress src, EtherAddress dst, Integer type, Integer vid, Short pcp) throws RpcException
src - An EtherAddress instance which specifies the
source MAC address. null matches every source
MAC address.dst - An EtherAddress instance which specifies the
destination MAC address. null matches every
destination MAC address.type - An Integer instance whcih specifies the ethernet
type. null matches every ethernet type.vid - The VLAN ID to match. EtherHeader.VLAN_NONE matches
untagged frame. null matches every VLAN frame,
including untagged frame.pcp - The VLAN priority to match. null matches every
VLAN priority.RpcException - The specified condition is invalid.public VTNEtherMatch(VtnEtherMatchFields vematch) throws RpcException
VtnEtherMatchFields.vematch - A VtnEtherMatchFields instance.NullPointerException - vematch is null.RpcException - vematch contains invalid value.public VTNEtherMatch(org.opendaylight.yang.gen.v1.urn.opendaylight.model.match.types.rev131026.EthernetMatchFields ematch,
org.opendaylight.yang.gen.v1.urn.opendaylight.model.match.types.rev131026.VlanMatchFields vmatch)
throws RpcException
EthernetMatchFields and
VlanMatchFields instances.ematch - A EthernetMatchFields instance.vmatch - A VlanMatchFields instance.RpcException - ematch or vmatch contains invalid value.public static VTNEtherMatch create(org.opendaylight.yang.gen.v1.urn.opendaylight.model.match.types.rev131026.Match match) throws RpcException
match - A MD-SAL flow match.VTNEtherMatch instance or null.NullPointerException - match is null.RpcException - match contains invalid condition against Ethernet header.public EtherAddress getSourceAddress()
EtherAddress instance if the source MAC address
is specified. null if not specified.public EtherAddress getDestinationAddress()
EtherAddress instance if the destination MAC address
is specified. null if not specified.public Integer getEtherType()
Integer instance if the ethernet type is specified.
null if not specified.public void setEtherType(Integer type) throws RpcException
type - An Integer instance whcih represents the ethernet
type to match against packets.
null matches every ethernet type.RpcException - The Ethernet type different from the given type is already configured
in this instance.public Integer getVlanId()
Integer instance if the VLAN ID is specified.
Note that EtherHeader.VLAN_NONE matches packets
that have no VLAN tag.
null if the VLAN ID is not specified.public Short getVlanPriority()
Short instance if the VLAN priority is specified.
null if the VLAN priority is not specified.public VtnEtherMatchBuilder toVtnEtherMatchBuilder()
VtnEtherMatchBuilder instance which contains the flow
conditions configured in this instance.VtnEtherMatchBuilder instance.public void setMatch(org.opendaylight.yang.gen.v1.urn.opendaylight.flow.types.rev131026.flow.MatchBuilder builder)
builder - A MatchBuilder instance.public boolean match(FlowMatchContext ctx)
ctx - A FlowMatchContext instance.true only if the given Ethernet header matches all
the conditions configured in this instance.public void setConditionKey(StringBuilder builder)
builder - A StringBuilder instance which contains strings
used to construct flow condition key.public void verify()
throws RpcException
RpcException - Verification failed.public boolean isEmpty()
true only if this instance is empty.public boolean equals(Object o)
Copyright © 2018 OpenDaylight. All rights reserved.