Class DefaultFilteringObjective.Builder
- java.lang.Object
-
- org.onosproject.net.flowobjective.DefaultFilteringObjective.Builder
-
- All Implemented Interfaces:
FilteringObjective.Builder
,Objective.Builder
- Enclosing class:
- DefaultFilteringObjective
public static final class DefaultFilteringObjective.Builder extends Object implements FilteringObjective.Builder
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description FilteringObjective
add()
Builds the filtering objective that will be added.FilteringObjective
add(ObjectiveContext context)
Builds the filtering objective that will be added.DefaultFilteringObjective.Builder
addCondition(Criterion criterion)
Add a filtering condition.DefaultFilteringObjective.Builder
deny()
Deny this filtering condition set.DefaultFilteringObjective.Builder
fromApp(ApplicationId appId)
Assigns an application id.DefaultFilteringObjective.Builder
makePermanent()
Makes the filtering objective permanent.DefaultFilteringObjective.Builder
makeTemporary(int timeout)
Makes the filtering objective temporary.DefaultFilteringObjective.Builder
permit()
Permit this filtering condition set.FilteringObjective
remove()
Builds the filtering objective that will be removed.FilteringObjective
remove(ObjectiveContext context)
Builds the filtering objective that will be removed.DefaultFilteringObjective.Builder
withKey(Criterion key)
Specify the key for the filter.DefaultFilteringObjective.Builder
withMeta(TrafficTreatment treatment)
Set meta information about this filtering condition set.DefaultFilteringObjective.Builder
withPriority(int priority)
Sets the priority for this objective.
-
-
-
Method Detail
-
withKey
public DefaultFilteringObjective.Builder withKey(Criterion key)
Description copied from interface:FilteringObjective.Builder
Specify the key for the filter.- Specified by:
withKey
in interfaceFilteringObjective.Builder
- Parameters:
key
- a criterion- Returns:
- a filter objective builder
-
addCondition
public DefaultFilteringObjective.Builder addCondition(Criterion criterion)
Description copied from interface:FilteringObjective.Builder
Add a filtering condition.- Specified by:
addCondition
in interfaceFilteringObjective.Builder
- Parameters:
criterion
- new criterion- Returns:
- a filtering builder
-
permit
public DefaultFilteringObjective.Builder permit()
Description copied from interface:FilteringObjective.Builder
Permit this filtering condition set.- Specified by:
permit
in interfaceFilteringObjective.Builder
- Returns:
- a filtering builder
-
deny
public DefaultFilteringObjective.Builder deny()
Description copied from interface:FilteringObjective.Builder
Deny this filtering condition set.- Specified by:
deny
in interfaceFilteringObjective.Builder
- Returns:
- a filtering builder
-
makeTemporary
public DefaultFilteringObjective.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 DefaultFilteringObjective.Builder makePermanent()
Description copied from interface:FilteringObjective.Builder
Makes the filtering objective permanent.- Specified by:
makePermanent
in interfaceFilteringObjective.Builder
- Specified by:
makePermanent
in interfaceObjective.Builder
- Returns:
- an objective builder
-
fromApp
public DefaultFilteringObjective.Builder fromApp(ApplicationId appId)
Description copied from interface:FilteringObjective.Builder
Assigns an application id.- Specified by:
fromApp
in interfaceFilteringObjective.Builder
- Specified by:
fromApp
in interfaceObjective.Builder
- Parameters:
appId
- an application id- Returns:
- a filtering builder
-
withPriority
public DefaultFilteringObjective.Builder withPriority(int priority)
Description copied from interface:FilteringObjective.Builder
Sets the priority for this objective.- Specified by:
withPriority
in interfaceFilteringObjective.Builder
- Specified by:
withPriority
in interfaceObjective.Builder
- Parameters:
priority
- an integer- Returns:
- an objective builder
-
withMeta
public DefaultFilteringObjective.Builder withMeta(TrafficTreatment treatment)
Description copied from interface:FilteringObjective.Builder
Set meta information about this filtering condition set.- Specified by:
withMeta
in interfaceFilteringObjective.Builder
- Parameters:
treatment
- traffic treatment to use- Returns:
- a filtering builder
-
add
public FilteringObjective add()
Description copied from interface:FilteringObjective.Builder
Builds the filtering objective that will be added.- Specified by:
add
in interfaceFilteringObjective.Builder
- Specified by:
add
in interfaceObjective.Builder
- Returns:
- a filtering objective
-
remove
public FilteringObjective remove()
Description copied from interface:FilteringObjective.Builder
Builds the filtering objective that will be removed.- Specified by:
remove
in interfaceFilteringObjective.Builder
- Specified by:
remove
in interfaceObjective.Builder
- Returns:
- a filtering objective.
-
add
public FilteringObjective add(ObjectiveContext context)
Description copied from interface:FilteringObjective.Builder
Builds the filtering objective that will be added. The context will be used to notify the calling application.- Specified by:
add
in interfaceFilteringObjective.Builder
- Specified by:
add
in interfaceObjective.Builder
- Parameters:
context
- an objective context- Returns:
- a filtering objective
-
remove
public FilteringObjective remove(ObjectiveContext context)
Description copied from interface:FilteringObjective.Builder
Builds the filtering objective that will be removed. The context will be used to notify the calling application.- Specified by:
remove
in interfaceFilteringObjective.Builder
- Specified by:
remove
in interfaceObjective.Builder
- Parameters:
context
- an objective context- Returns:
- a filtering objective
-
-