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 Object implements ForwardingObjective.Builder
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ForwardingObjective
add()
Builds the forwarding objective that will be added.ForwardingObjective
add(ObjectiveContext context)
Builds the forwarding objective that will be added.DefaultForwardingObjective.Builder
fromApp(ApplicationId appId)
Assigns an application id.DefaultForwardingObjective.Builder
makePermanent()
Makes the forwarding objective permanent.DefaultForwardingObjective.Builder
makeTemporary(int timeout)
Makes the filtering objective temporary.DefaultForwardingObjective.Builder
nextStep(int nextId)
Assigns a next step to the forwarding objective.ForwardingObjective
remove()
Builds the forwarding objective that will be removed.ForwardingObjective
remove(ObjectiveContext context)
Builds the forwarding objective that will be removed.DefaultForwardingObjective.Builder
withAnnotations(Annotations annotations)
Adds annotations to the forwarding objective.DefaultForwardingObjective.Builder
withFlag(ForwardingObjective.Flag flag)
Assigns the flag to the forwarding objective.DefaultForwardingObjective.Builder
withMeta(TrafficSelector meta)
Set meta information related to this forwarding objective.DefaultForwardingObjective.Builder
withPriority(int priority)
Sets the priority for this objective.DefaultForwardingObjective.Builder
withSelector(TrafficSelector selector)
Assigns a selector to the forwarding objective.DefaultForwardingObjective.Builder
withTreatment(TrafficTreatment treatment)
Assigns the treatment for this forwarding objective.
-
-
-
Method Detail
-
withSelector
public DefaultForwardingObjective.Builder withSelector(TrafficSelector selector)
Description copied from interface:ForwardingObjective.Builder
Assigns a selector to the forwarding objective.- Specified by:
withSelector
in interfaceForwardingObjective.Builder
- Parameters:
selector
- a traffic selector- Returns:
- a forwarding objective builder
-
nextStep
public DefaultForwardingObjective.Builder nextStep(int nextId)
Description copied from interface:ForwardingObjective.Builder
Assigns a next step to the forwarding objective.- Specified by:
nextStep
in 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.Builder
Assigns the treatment for this forwarding objective.- Specified by:
withTreatment
in interfaceForwardingObjective.Builder
- Parameters:
treatment
- a traffic treatment- Returns:
- a forwarding objective
-
withFlag
public DefaultForwardingObjective.Builder withFlag(ForwardingObjective.Flag flag)
Description copied from interface:ForwardingObjective.Builder
Assigns the flag to the forwarding objective.- Specified by:
withFlag
in interfaceForwardingObjective.Builder
- Parameters:
flag
- a flag- Returns:
- a forwarding objective builder
-
makeTemporary
public DefaultForwardingObjective.Builder makeTemporary(int timeout)
Description copied from interface:Objective.Builder
Makes the filtering objective temporary.- Specified by:
makeTemporary
in interfaceObjective.Builder
- Parameters:
timeout
- a timeout- Returns:
- an objective builder
-
makePermanent
public DefaultForwardingObjective.Builder makePermanent()
Description copied from interface:ForwardingObjective.Builder
Makes the forwarding objective permanent.- Specified by:
makePermanent
in interfaceForwardingObjective.Builder
- Specified by:
makePermanent
in interfaceObjective.Builder
- Returns:
- an objective builder
-
fromApp
public DefaultForwardingObjective.Builder fromApp(ApplicationId appId)
Description copied from interface:ForwardingObjective.Builder
Assigns an application id.- Specified by:
fromApp
in interfaceForwardingObjective.Builder
- Specified by:
fromApp
in interfaceObjective.Builder
- Parameters:
appId
- an application id- Returns:
- a filtering builder
-
withPriority
public DefaultForwardingObjective.Builder withPriority(int priority)
Description copied from interface:ForwardingObjective.Builder
Sets the priority for this objective.- Specified by:
withPriority
in interfaceForwardingObjective.Builder
- Specified by:
withPriority
in interfaceObjective.Builder
- Parameters:
priority
- an integer- Returns:
- an objective builder
-
withMeta
public DefaultForwardingObjective.Builder withMeta(TrafficSelector meta)
Description copied from interface:ForwardingObjective.Builder
Set meta information related to this forwarding objective.- Specified by:
withMeta
in interfaceForwardingObjective.Builder
- Parameters:
meta
- match conditions- Returns:
- an objective builder
-
withAnnotations
public DefaultForwardingObjective.Builder withAnnotations(Annotations annotations)
Description copied from interface:ForwardingObjective.Builder
Adds annotations to the forwarding objective.- Specified by:
withAnnotations
in interfaceForwardingObjective.Builder
- Specified by:
withAnnotations
in interfaceObjective.Builder
- Parameters:
annotations
- the annotations for the forwarding objective- Returns:
- a forwarding objective builder
-
add
public ForwardingObjective add()
Description copied from interface:ForwardingObjective.Builder
Builds the forwarding objective that will be added.- Specified by:
add
in interfaceForwardingObjective.Builder
- Specified by:
add
in interfaceObjective.Builder
- Returns:
- a forwarding objective
-
remove
public ForwardingObjective remove()
Description copied from interface:ForwardingObjective.Builder
Builds the forwarding objective that will be removed.- Specified by:
remove
in interfaceForwardingObjective.Builder
- Specified by:
remove
in interfaceObjective.Builder
- Returns:
- a forwarding objective.
-
add
public ForwardingObjective add(ObjectiveContext context)
Description copied from interface:ForwardingObjective.Builder
Builds the forwarding objective that will be added. The context will be used to notify the calling application.- Specified by:
add
in interfaceForwardingObjective.Builder
- Specified by:
add
in interfaceObjective.Builder
- Parameters:
context
- an objective context- Returns:
- a forwarding objective
-
remove
public ForwardingObjective remove(ObjectiveContext context)
Description copied from interface:ForwardingObjective.Builder
Builds the forwarding objective that will be removed. The context will be used to notify the calling application.- Specified by:
remove
in interfaceForwardingObjective.Builder
- Specified by:
remove
in interfaceObjective.Builder
- Parameters:
context
- an objective context- Returns:
- a forwarding objective
-
-