public interface Match extends OFObject
false
for supports(...)
calls, and throw UnsupportedOperationException
from all
other methods in such cases.
UnsupportedOperationException
if given
in setMasked
an IP mask of, for example, 255.0.255.0, or if setMasked
is called for any field
which is not IP source/destination address.
Modifier and Type | Interface and Description |
---|---|
static interface |
Match.Builder
Builder interface for Match objects.
|
Modifier and Type | Method and Description |
---|---|
Match.Builder |
createBuilder()
Returns a builder to build new instances of this type of match object.
|
<F extends OFValueType<F>> |
get(MatchField<F> field)
Returns a value for the given field if:
Field is supported
Field is not fully wildcarded
Prerequisites are ok
If one of the above conditions does not hold, returns null.
|
<F extends OFValueType<F>> |
getMasked(MatchField<F> field)
Returns the masked value for the given field from this match, along with the mask itself.
|
Iterable<MatchField<?>> |
getMatchFields()
Get an Iterable over the match fields that have been specified for the
match.
|
boolean |
isExact(MatchField<?> field)
Returns true if and only if this field is currently specified in the match with an exact value and
no mask.
|
boolean |
isFullyWildcarded(MatchField<?> field)
True if and only if this field is currently logically unspecified in the match, i.e, the
value returned by getValue(f) has no impact on whether a packet will be selected
by the match or not.
|
boolean |
isPartiallyMasked(MatchField<?> field)
True if and only if this field is currently partially specified in the match, i.e, the
match will only select packets that match (p.value & getMask(field)) == getValue(field),
and getMask(field) != 0.
|
boolean |
supports(MatchField<?> field)
Returns true if and only if this match object supports the given match field.
|
boolean |
supportsMasked(MatchField<?> field)
Returns true if and only if this match object supports partially bitmasking of the given field.
|
getVersion
putTo
<F extends OFValueType<F>> F get(MatchField<F> field) throws UnsupportedOperationException
field
- Match field to retrievenull
if field is one of the conditions above does not hold.UnsupportedOperationException
- If field is not supported.<F extends OFValueType<F>> Masked<F> getMasked(MatchField<F> field) throws UnsupportedOperationException
null
is returned.field
- Match field to retrieve.UnsupportedOperationException
- If field is not supported.boolean supports(MatchField<?> field)
field
- Match fieldboolean supportsMasked(MatchField<?> field) throws UnsupportedOperationException
field
- Match field.UnsupportedOperationException
- If field is not supported.boolean isExact(MatchField<?> field) throws UnsupportedOperationException
field
- Match field.UnsupportedOperationException
- If field is not supported.boolean isFullyWildcarded(MatchField<?> field) throws UnsupportedOperationException
field
- Match field.UnsupportedOperationException
- If field is not supported.boolean isPartiallyMasked(MatchField<?> field) throws UnsupportedOperationException
field
- Match field.UnsupportedOperationException
- If field is not supported.Iterable<MatchField<?>> getMatchFields()
Match.Builder createBuilder()
Copyright © 2015. All rights reserved.