Package org.onosproject.net.intent
Class PathIntent.Builder
- java.lang.Object
-
- org.onosproject.net.intent.Intent.Builder
-
- org.onosproject.net.intent.ConnectivityIntent.Builder
-
- org.onosproject.net.intent.PathIntent.Builder
-
- Enclosing class:
- PathIntent
public static class PathIntent.Builder extends ConnectivityIntent.Builder
Builder of a host to host intent.
-
-
Field Summary
-
Fields inherited from class org.onosproject.net.intent.ConnectivityIntent.Builder
constraints, selector, treatment
-
Fields inherited from class org.onosproject.net.intent.Intent.Builder
appId, key, priority, resourceGroup, resources
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedBuilder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description PathIntent.BuilderappId(ApplicationId appId)Sets the application id for the intent that will be built.PathIntentbuild()Builds a path intent from the accumulated parameters.PathIntent.Builderconstraints(List<Constraint> constraints)Sets the constraints for the intent that will be built.PathIntent.Builderkey(Key key)Sets the key for the intent that will be built.PathIntent.Builderpath(Path path)Sets the path of the intent that will be built.PathIntent.Builderpriority(int priority)Sets the priority for the intent that will be built.PathIntent.BuilderresourceGroup(ResourceGroup resourceGroup)Sets the resource group for this intent.PathIntent.Builderselector(TrafficSelector selector)Sets the traffic selector for the intent that will be built.PathIntent.BuildersetType(PathIntent.ProtectionType type)PathIntent.Buildertreatment(TrafficTreatment treatment)Sets the traffic treatment for the intent that will be built.-
Methods inherited from class org.onosproject.net.intent.Intent.Builder
resources
-
-
-
-
Method Detail
-
appId
public PathIntent.Builder appId(ApplicationId appId)
Description copied from class:Intent.BuilderSets the application id for the intent that will be built.- Overrides:
appIdin classConnectivityIntent.Builder- Parameters:
appId- application id to use for built intent- Returns:
- this builder
-
key
public PathIntent.Builder key(Key key)
Description copied from class:Intent.BuilderSets the key for the intent that will be built.- Overrides:
keyin classConnectivityIntent.Builder- Parameters:
key- key to use for built intent- Returns:
- this builder
-
selector
public PathIntent.Builder selector(TrafficSelector selector)
Description copied from class:ConnectivityIntent.BuilderSets the traffic selector for the intent that will be built.- Overrides:
selectorin classConnectivityIntent.Builder- Parameters:
selector- selector to use for built intent- Returns:
- this builder
-
treatment
public PathIntent.Builder treatment(TrafficTreatment treatment)
Description copied from class:ConnectivityIntent.BuilderSets the traffic treatment for the intent that will be built.- Overrides:
treatmentin classConnectivityIntent.Builder- Parameters:
treatment- treatment to use for built intent- Returns:
- this builder
-
constraints
public PathIntent.Builder constraints(List<Constraint> constraints)
Description copied from class:ConnectivityIntent.BuilderSets the constraints for the intent that will be built.- Overrides:
constraintsin classConnectivityIntent.Builder- Parameters:
constraints- constraints to use for built intent- Returns:
- this builder
-
priority
public PathIntent.Builder priority(int priority)
Description copied from class:Intent.BuilderSets the priority for the intent that will be built.- Overrides:
priorityin classConnectivityIntent.Builder- Parameters:
priority- priority to use for built intent- Returns:
- this builder
-
resourceGroup
public PathIntent.Builder resourceGroup(ResourceGroup resourceGroup)
Description copied from class:Intent.BuilderSets the resource group for this intent.- Overrides:
resourceGroupin classIntent.Builder- Parameters:
resourceGroup- the resource group- Returns:
- this builder
-
path
public PathIntent.Builder path(Path path)
Sets the path of the intent that will be built.- Parameters:
path- path for the intent- Returns:
- this builder
-
setType
public PathIntent.Builder setType(PathIntent.ProtectionType type)
-
build
public PathIntent build()
Builds a path intent from the accumulated parameters.- Returns:
- point to point intent
-
-