Class DefaultNextObjective
- java.lang.Object
-
- org.onosproject.net.flowobjective.DefaultNextObjective
-
- All Implemented Interfaces:
NextObjective
,Objective
@Beta public final class DefaultNextObjective extends Object implements NextObjective
Default implementation of a next objective.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
DefaultNextObjective.Builder
-
Nested classes/interfaces inherited from interface org.onosproject.net.flowobjective.NextObjective
NextObjective.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 DefaultNextObjective.Builder
builder()
Returns a new builder.Optional<ObjectiveContext>
context()
Obtains an optional context.DefaultNextObjective.Builder
copy()
Returns a new builder set to create a copy of this objective.boolean
equals(Object obj)
int
hashCode()
int
id()
An identifier for this objective.TrafficSelector
meta()
Auxiliary optional information provided to the device driver.Collection<TrafficTreatment>
next()
The collection of treatments that need to be applied to a set of traffic.Collection<NextTreatment>
nextTreatments()
The collection of next treatments that need to be applied to a set of traffic.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.String
toString()
NextObjective.Type
type()
The type of operation that will be applied to the traffic using the collection of treatments.
-
-
-
Method Detail
-
next
public Collection<TrafficTreatment> next()
Description copied from interface:NextObjective
The collection of treatments that need to be applied to a set of traffic.- Specified by:
next
in interfaceNextObjective
- Returns:
- a collection of traffic treatments
-
nextTreatments
public Collection<NextTreatment> nextTreatments()
Description copied from interface:NextObjective
The collection of next treatments that need to be applied to a set of traffic.- Specified by:
nextTreatments
in interfaceNextObjective
- Returns:
- a collection of next treatments
-
type
public NextObjective.Type type()
Description copied from interface:NextObjective
The type of operation that will be applied to the traffic using the collection of treatments.- Specified by:
type
in interfaceNextObjective
- Returns:
- a type
-
id
public int id()
Description copied from interface:Objective
An identifier for this objective.
-
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 Optional<ObjectiveContext> context()
Description copied from interface:Objective
Obtains an optional context.
-
meta
public TrafficSelector meta()
Description copied from interface:NextObjective
Auxiliary optional information provided to the device driver. Typically conveys information about selectors (matches) that are intended to use this Next Objective.- Specified by:
meta
in interfaceNextObjective
- Returns:
- a selector intended to pass meta information to the device driver. Value may be null if no meta information is provided.
-
builder
public static DefaultNextObjective.Builder builder()
Returns a new builder.- Returns:
- new builder
-
copy
public DefaultNextObjective.Builder copy()
Description copied from interface:NextObjective
Returns a new builder set to create a copy of this objective.- Specified by:
copy
in interfaceNextObjective
- Specified by:
copy
in interfaceObjective
- Returns:
- new builder
-
-