Class DefaultForwardingObjective
- java.lang.Object
-
- org.onosproject.net.flowobjective.DefaultForwardingObjective
-
- All Implemented Interfaces:
ForwardingObjective
,Objective
@Beta public final class DefaultForwardingObjective extends Object implements ForwardingObjective
Default implementation of a forwarding objective.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
DefaultForwardingObjective.Builder
-
Nested classes/interfaces inherited from interface org.onosproject.net.flowobjective.ForwardingObjective
ForwardingObjective.Flag
-
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 DefaultForwardingObjective.Builder
builder()
Returns a new builder.static DefaultForwardingObjective.Builder
builder(ForwardingObjective fwd)
Returns a new builder primed to produce entities patterned after the supplied forwarding objective.Optional<ObjectiveContext>
context()
Obtains an optional context.DefaultForwardingObjective.Builder
copy()
Returns a new builder set to create a copy of this objective.boolean
equals(Object obj)
ForwardingObjective.Flag
flag()
Obtain the type of this objective.int
hashCode()
int
id()
An identifier for this objective.TrafficSelector
meta()
Auxiliary optional information provided to the device driver.Integer
nextId()
Obtain the traffic treatment for this objective.Objective.Operation
op()
The type of operation for this objective.boolean
permanent()
Whether this objective is permanent.int
priority()
The priority for this objective.TrafficSelector
selector()
Obtain the selector for this objective.int
timeout()
The timeout for this objective.String
toString()
TrafficTreatment
treatment()
A traffic treatment for this forwarding objective.
-
-
-
Method Detail
-
selector
public TrafficSelector selector()
Description copied from interface:ForwardingObjective
Obtain the selector for this objective.- Specified by:
selector
in interfaceForwardingObjective
- Returns:
- a traffic selector
-
nextId
public Integer nextId()
Description copied from interface:ForwardingObjective
Obtain the traffic treatment for this objective. Mutually exclusive with 'treatment'.- Specified by:
nextId
in interfaceForwardingObjective
- Returns:
- an integer
-
treatment
public TrafficTreatment treatment()
Description copied from interface:ForwardingObjective
A traffic treatment for this forwarding objective. Mutually exclusive with a nextId.- Specified by:
treatment
in interfaceForwardingObjective
- Returns:
- a traffic treatment
-
flag
public ForwardingObjective.Flag flag()
Description copied from interface:ForwardingObjective
Obtain the type of this objective.- Specified by:
flag
in interfaceForwardingObjective
- Returns:
- a flag 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:ForwardingObjective
Auxiliary optional information provided to the device driver. Typically conveys information about selectors (matches) that are intended to use this Forwarding Objective.- Specified by:
meta
in interfaceForwardingObjective
- 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 DefaultForwardingObjective.Builder builder()
Returns a new builder.- Returns:
- new builder
-
builder
public static DefaultForwardingObjective.Builder builder(ForwardingObjective fwd)
Returns a new builder primed to produce entities patterned after the supplied forwarding objective.- Parameters:
fwd
- base fwd- Returns:
- forwarding objective builder
-
copy
public DefaultForwardingObjective.Builder copy()
Description copied from interface:ForwardingObjective
Returns a new builder set to create a copy of this objective.- Specified by:
copy
in interfaceForwardingObjective
- Specified by:
copy
in interfaceObjective
- Returns:
- new builder
-
-