Class DefaultFilteringObjective
- java.lang.Object
-
- org.onosproject.net.flowobjective.DefaultFilteringObjective
-
- All Implemented Interfaces:
FilteringObjective
,Objective
@Beta public final class DefaultFilteringObjective extends java.lang.Object implements FilteringObjective
Default implementation of a filtering objective.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
DefaultFilteringObjective.Builder
-
Nested classes/interfaces inherited from interface org.onosproject.net.flowobjective.FilteringObjective
FilteringObjective.Type
-
Nested classes/interfaces inherited from interface org.onosproject.net.flowobjective.Objective
Objective.Operation
-
-
Field Summary
-
Fields inherited from interface org.onosproject.net.flowobjective.Objective
DEFAULT_PERMANENT, DEFAULT_PRIORITY, DEFAULT_TIMEOUT, MAX_PRIORITY, MIN_PRIORITY
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description ApplicationId
appId()
The application which applied this objective.static DefaultFilteringObjective.Builder
builder()
Returns a new builder.java.util.Collection<Criterion>
conditions()
The set of conditions the filter must provision at the device.java.util.Optional<ObjectiveContext>
context()
Obtains an optional context.DefaultFilteringObjective.Builder
copy()
Returns a new builder set to create a copy of this objective.boolean
equals(java.lang.Object obj)
int
hashCode()
int
id()
An identifier for this objective.Criterion
key()
Obtain the key for this filter.TrafficTreatment
meta()
Auxiliary optional information provided to the device driver.Objective.Operation
op()
The type of operation for this objective.boolean
permanent()
Whether this objective is permanent.int
priority()
The priority for this objective.int
timeout()
The timeout for this objective.java.lang.String
toString()
FilteringObjective.Type
type()
Obtain this filtering type.
-
-
-
Method Detail
-
key
public Criterion key()
Description copied from interface:FilteringObjective
Obtain the key for this filter. The filter may or may not require a key.- Specified by:
key
in interfaceFilteringObjective
- Returns:
- a criterion, which could be null if no key was provided.
-
type
public FilteringObjective.Type type()
Description copied from interface:FilteringObjective
Obtain this filtering type.- Specified by:
type
in interfaceFilteringObjective
- Returns:
- the type
-
conditions
public java.util.Collection<Criterion> conditions()
Description copied from interface:FilteringObjective
The set of conditions the filter must provision at the device.- Specified by:
conditions
in interfaceFilteringObjective
- Returns:
- a collection of criteria
-
id
public int id()
Description copied from interface:Objective
An identifier for this objective.
-
meta
public TrafficTreatment meta()
Description copied from interface:FilteringObjective
Auxiliary optional information provided to the device driver. Typically conveys information about changes (treatments) to packets that are permitted into the pipeline by the PERMIT filtering condition.- Specified by:
meta
in interfaceFilteringObjective
- Returns:
- a treatment on the packets that make it through the PERMIT filters. Value may be null if no meta information is provided.
-
priority
public int priority()
Description copied from interface:Objective
The priority for this objective.
-
appId
public ApplicationId appId()
Description copied from interface:Objective
The application which applied this objective.
-
timeout
public int timeout()
Description copied from interface:Objective
The timeout for this objective.
-
permanent
public boolean permanent()
Description copied from interface:Objective
Whether this objective is permanent.
-
op
public Objective.Operation op()
Description copied from interface:Objective
The type of operation for this objective.
-
context
public java.util.Optional<ObjectiveContext> context()
Description copied from interface:Objective
Obtains an optional context.
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equals
in classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
builder
public static DefaultFilteringObjective.Builder builder()
Returns a new builder.- Returns:
- new builder
-
copy
public DefaultFilteringObjective.Builder copy()
Description copied from interface:FilteringObjective
Returns a new builder set to create a copy of this objective.- Specified by:
copy
in interfaceFilteringObjective
- Specified by:
copy
in interfaceObjective
- Returns:
- new builder
-
-