Class DefaultForwardingObjective.Builder
- java.lang.Object
-
- org.onosproject.net.flowobjective.DefaultForwardingObjective.Builder
-
- All Implemented Interfaces:
ForwardingObjective.Builder,Objective.Builder
- Enclosing class:
- DefaultForwardingObjective
public static final class DefaultForwardingObjective.Builder extends java.lang.Object implements ForwardingObjective.Builder
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ForwardingObjectiveadd()Builds the forwarding objective that will be added.ForwardingObjectiveadd(ObjectiveContext context)Builds the forwarding objective that will be added.DefaultForwardingObjective.BuilderfromApp(ApplicationId appId)Assigns an application id.DefaultForwardingObjective.BuildermakePermanent()Makes the filtering objective permanent.DefaultForwardingObjective.BuildermakeTemporary(int timeout)Makes the filtering objective temporary.DefaultForwardingObjective.BuildernextStep(int nextId)Assigns a next step to the forwarding objective.ForwardingObjectiveremove()Builds the forwarding objective that will be removed.ForwardingObjectiveremove(ObjectiveContext context)Builds the forwarding objective that will be removed.DefaultForwardingObjective.BuilderwithFlag(ForwardingObjective.Flag flag)Assigns the flag to the forwarding objective.DefaultForwardingObjective.BuilderwithMeta(TrafficSelector meta)Set meta information related to this forwarding objective.DefaultForwardingObjective.BuilderwithPriority(int priority)Sets the priority for this objective.DefaultForwardingObjective.BuilderwithSelector(TrafficSelector selector)Assigns a selector to the forwarding objective.DefaultForwardingObjective.BuilderwithTreatment(TrafficTreatment treatment)Assigns the treatment for this forwarding objective.
-
-
-
Method Detail
-
withSelector
public DefaultForwardingObjective.Builder withSelector(TrafficSelector selector)
Description copied from interface:ForwardingObjective.BuilderAssigns a selector to the forwarding objective.- Specified by:
withSelectorin interfaceForwardingObjective.Builder- Parameters:
selector- a traffic selector- Returns:
- a forwarding objective builder
-
nextStep
public DefaultForwardingObjective.Builder nextStep(int nextId)
Description copied from interface:ForwardingObjective.BuilderAssigns a next step to the forwarding objective.- Specified by:
nextStepin interfaceForwardingObjective.Builder- Parameters:
nextId- a next objective id.- Returns:
- a forwarding objective builder
-
withTreatment
public DefaultForwardingObjective.Builder withTreatment(TrafficTreatment treatment)
Description copied from interface:ForwardingObjective.BuilderAssigns the treatment for this forwarding objective.- Specified by:
withTreatmentin interfaceForwardingObjective.Builder- Parameters:
treatment- a traffic treatment- Returns:
- a forwarding objective
-
withFlag
public DefaultForwardingObjective.Builder withFlag(ForwardingObjective.Flag flag)
Description copied from interface:ForwardingObjective.BuilderAssigns the flag to the forwarding objective.- Specified by:
withFlagin interfaceForwardingObjective.Builder- Parameters:
flag- a flag- Returns:
- a forwarding objective builder
-
makeTemporary
public DefaultForwardingObjective.Builder makeTemporary(int timeout)
Description copied from interface:Objective.BuilderMakes the filtering objective temporary.- Specified by:
makeTemporaryin interfaceObjective.Builder- Parameters:
timeout- a timeout- Returns:
- an objective builder
-
makePermanent
public DefaultForwardingObjective.Builder makePermanent()
Description copied from interface:ForwardingObjective.BuilderMakes the filtering objective permanent.- Specified by:
makePermanentin interfaceForwardingObjective.Builder- Specified by:
makePermanentin interfaceObjective.Builder- Returns:
- an objective builder
-
fromApp
public DefaultForwardingObjective.Builder fromApp(ApplicationId appId)
Description copied from interface:ForwardingObjective.BuilderAssigns an application id.- Specified by:
fromAppin interfaceForwardingObjective.Builder- Specified by:
fromAppin interfaceObjective.Builder- Parameters:
appId- an application id- Returns:
- a filtering builder
-
withPriority
public DefaultForwardingObjective.Builder withPriority(int priority)
Description copied from interface:ForwardingObjective.BuilderSets the priority for this objective.- Specified by:
withPriorityin interfaceForwardingObjective.Builder- Specified by:
withPriorityin interfaceObjective.Builder- Parameters:
priority- an integer- Returns:
- an objective builder
-
withMeta
public DefaultForwardingObjective.Builder withMeta(TrafficSelector meta)
Description copied from interface:ForwardingObjective.BuilderSet meta information related to this forwarding objective.- Specified by:
withMetain interfaceForwardingObjective.Builder- Parameters:
meta- match conditions- Returns:
- an objective builder
-
add
public ForwardingObjective add()
Description copied from interface:ForwardingObjective.BuilderBuilds the forwarding objective that will be added.- Specified by:
addin interfaceForwardingObjective.Builder- Specified by:
addin interfaceObjective.Builder- Returns:
- a forwarding objective
-
remove
public ForwardingObjective remove()
Description copied from interface:ForwardingObjective.BuilderBuilds the forwarding objective that will be removed.- Specified by:
removein interfaceForwardingObjective.Builder- Specified by:
removein interfaceObjective.Builder- Returns:
- a forwarding objective.
-
add
public ForwardingObjective add(ObjectiveContext context)
Description copied from interface:ForwardingObjective.BuilderBuilds the forwarding objective that will be added. The context will be used to notify the calling application.- Specified by:
addin interfaceForwardingObjective.Builder- Specified by:
addin interfaceObjective.Builder- Parameters:
context- an objective context- Returns:
- a forwarding objective
-
remove
public ForwardingObjective remove(ObjectiveContext context)
Description copied from interface:ForwardingObjective.BuilderBuilds the forwarding objective that will be removed. The context will be used to notify the calling application.- Specified by:
removein interfaceForwardingObjective.Builder- Specified by:
removein interfaceObjective.Builder- Parameters:
context- an objective context- Returns:
- a forwarding objective
-
-