Class DefaultNextObjective.Builder
- java.lang.Object
-
- org.onosproject.net.flowobjective.DefaultNextObjective.Builder
-
- All Implemented Interfaces:
NextObjective.Builder
,Objective.Builder
- Enclosing class:
- DefaultNextObjective
public static final class DefaultNextObjective.Builder extends Object implements NextObjective.Builder
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description NextObjective
add()
Builds the next objective that will be added.NextObjective
add(ObjectiveContext context)
Builds the next objective that will be added.NextObjective
addToExisting()
Build the next objective that will be added, withObjective.Operation
ADD_TO_EXISTING.NextObjective
addToExisting(ObjectiveContext context)
Builds the next objective that will be added, withObjective.Operation
ADD_TO_EXISTING.DefaultNextObjective.Builder
addTreatment(TrafficTreatment treatment)
Adds a treatment to this next step.DefaultNextObjective.Builder
addTreatment(NextTreatment nextTreatment)
Adds a next treatment to this next step.DefaultNextObjective.Builder
fromApp(ApplicationId appId)
Specifies the application which applied the filter.DefaultNextObjective.Builder
makePermanent()
Noop.DefaultNextObjective.Builder
makeTemporary(int timeout)
Noop.NextObjective
modify()
Build the next objective that will be modified withObjective.Operation
MODIFY.NextObjective
modify(ObjectiveContext context)
Build the next objective that will be modified, withObjective.Operation
MODIFY.NextObjective
remove()
Builds the next objective that will be removed.NextObjective
remove(ObjectiveContext context)
Builds the next objective that will be removed.NextObjective
removeFromExisting()
Build the next objective that will be removed, withObjective.Operation
REMOVE_FROM_EXISTING.NextObjective
removeFromExisting(ObjectiveContext context)
Builds the next objective that will be removed, withObjective.Operation
REMOVE_FROM_EXISTING.NextObjective
verify()
Builds the next objective that needs to be verified.NextObjective
verify(ObjectiveContext context)
Builds the next objective that needs to be verified.DefaultNextObjective.Builder
withId(int nextId)
Specifies the id for this next objective.DefaultNextObjective.Builder
withMeta(TrafficSelector meta)
Set meta information related to this next objective.DefaultNextObjective.Builder
withPriority(int priority)
Noop.DefaultNextObjective.Builder
withType(NextObjective.Type type)
Sets the type of next step.
-
-
-
Method Detail
-
withId
public DefaultNextObjective.Builder withId(int nextId)
Description copied from interface:NextObjective.Builder
Specifies the id for this next objective.- Specified by:
withId
in interfaceNextObjective.Builder
- Parameters:
nextId
- an integer- Returns:
- a next objective builder
-
withType
public DefaultNextObjective.Builder withType(NextObjective.Type type)
Description copied from interface:NextObjective.Builder
Sets the type of next step.- Specified by:
withType
in interfaceNextObjective.Builder
- Parameters:
type
- a type- Returns:
- a next step builder
-
addTreatment
public DefaultNextObjective.Builder addTreatment(TrafficTreatment treatment)
Description copied from interface:NextObjective.Builder
Adds a treatment to this next step.- Specified by:
addTreatment
in interfaceNextObjective.Builder
- Parameters:
treatment
- a traffic treatment- Returns:
- a next step builder
-
addTreatment
public DefaultNextObjective.Builder addTreatment(NextTreatment nextTreatment)
Description copied from interface:NextObjective.Builder
Adds a next treatment to this next step.- Specified by:
addTreatment
in interfaceNextObjective.Builder
- Parameters:
nextTreatment
- a next treatment- Returns:
- a next step builder
-
makeTemporary
public DefaultNextObjective.Builder makeTemporary(int timeout)
Noop. This method has no effect.- Specified by:
makeTemporary
in interfaceObjective.Builder
- Parameters:
timeout
- a timeout- Returns:
- a next objective builder
-
makePermanent
public DefaultNextObjective.Builder makePermanent()
Noop. This method has no effect.- Specified by:
makePermanent
in interfaceObjective.Builder
- Returns:
- a next objective builder
-
fromApp
public DefaultNextObjective.Builder fromApp(ApplicationId appId)
Description copied from interface:NextObjective.Builder
Specifies the application which applied the filter.- Specified by:
fromApp
in interfaceNextObjective.Builder
- Specified by:
fromApp
in interfaceObjective.Builder
- Parameters:
appId
- an application id- Returns:
- an objective builder
-
withPriority
public DefaultNextObjective.Builder withPriority(int priority)
Noop. This method has no effect.- Specified by:
withPriority
in interfaceNextObjective.Builder
- Specified by:
withPriority
in interfaceObjective.Builder
- Parameters:
priority
- an integer- Returns:
- a next objective builder
-
withMeta
public DefaultNextObjective.Builder withMeta(TrafficSelector meta)
Description copied from interface:NextObjective.Builder
Set meta information related to this next objective.- Specified by:
withMeta
in interfaceNextObjective.Builder
- Parameters:
meta
- match conditions- Returns:
- an objective builder
-
add
public NextObjective add()
Description copied from interface:NextObjective.Builder
Builds the next objective that will be added.- Specified by:
add
in interfaceNextObjective.Builder
- Specified by:
add
in interfaceObjective.Builder
- Returns:
- a next objective
-
remove
public NextObjective remove()
Description copied from interface:NextObjective.Builder
Builds the next objective that will be removed.- Specified by:
remove
in interfaceNextObjective.Builder
- Specified by:
remove
in interfaceObjective.Builder
- Returns:
- a next objective.
-
add
public NextObjective add(ObjectiveContext context)
Description copied from interface:NextObjective.Builder
Builds the next objective that will be added. The context will be used to notify the calling application.- Specified by:
add
in interfaceNextObjective.Builder
- Specified by:
add
in interfaceObjective.Builder
- Parameters:
context
- an objective context- Returns:
- a next objective
-
remove
public NextObjective remove(ObjectiveContext context)
Description copied from interface:NextObjective.Builder
Builds the next objective that will be removed. The context will be used to notify the calling application.- Specified by:
remove
in interfaceNextObjective.Builder
- Specified by:
remove
in interfaceObjective.Builder
- Parameters:
context
- an objective context- Returns:
- a next objective
-
addToExisting
public NextObjective addToExisting()
Description copied from interface:NextObjective.Builder
Build the next objective that will be added, withObjective.Operation
ADD_TO_EXISTING.- Specified by:
addToExisting
in interfaceNextObjective.Builder
- Returns:
- a next objective
-
removeFromExisting
public NextObjective removeFromExisting()
Description copied from interface:NextObjective.Builder
Build the next objective that will be removed, withObjective.Operation
REMOVE_FROM_EXISTING.- Specified by:
removeFromExisting
in interfaceNextObjective.Builder
- Returns:
- a next objective
-
addToExisting
public NextObjective addToExisting(ObjectiveContext context)
Description copied from interface:NextObjective.Builder
Builds the next objective that will be added, withObjective.Operation
ADD_TO_EXISTING. The context will be used to notify the calling application.- Specified by:
addToExisting
in interfaceNextObjective.Builder
- Parameters:
context
- an objective context- Returns:
- a next objective
-
removeFromExisting
public NextObjective removeFromExisting(ObjectiveContext context)
Description copied from interface:NextObjective.Builder
Builds the next objective that will be removed, withObjective.Operation
REMOVE_FROM_EXISTING. The context will be used to notify the calling application.- Specified by:
removeFromExisting
in interfaceNextObjective.Builder
- Parameters:
context
- an objective context- Returns:
- a next objective
-
modify
public NextObjective modify()
Description copied from interface:NextObjective.Builder
Build the next objective that will be modified withObjective.Operation
MODIFY.- Specified by:
modify
in interfaceNextObjective.Builder
- Returns:
- a next objective
-
modify
public NextObjective modify(ObjectiveContext context)
Description copied from interface:NextObjective.Builder
Build the next objective that will be modified, withObjective.Operation
MODIFY. The context will be used to notify the calling application.- Specified by:
modify
in interfaceNextObjective.Builder
- Parameters:
context
- an objective context- Returns:
- a next objective
-
verify
public NextObjective verify()
Description copied from interface:NextObjective.Builder
Builds the next objective that needs to be verified.- Specified by:
verify
in interfaceNextObjective.Builder
- Returns:
- a next objective with
Objective.Operation
VERIFY
-
verify
public NextObjective verify(ObjectiveContext context)
Description copied from interface:NextObjective.Builder
Builds the next objective that needs to be verified. The context will be used to notify the calling application.- Specified by:
verify
in interfaceNextObjective.Builder
- Parameters:
context
- an objective context- Returns:
- a next objective with
Objective.Operation
VERIFY
-
-