Package org.onosproject.net.intent
Class Intent.Builder
- java.lang.Object
-
- org.onosproject.net.intent.Intent.Builder
-
- Direct Known Subclasses:
ConnectivityIntent.Builder
,DomainIntent.Builder
,OpticalCircuitIntent.Builder
,OpticalConnectivityIntent.Builder
,OpticalOduIntent.Builder
,OpticalPathIntent.Builder
,ProtectionEndpointIntent.Builder
- Enclosing class:
- Intent
public abstract static class Intent.Builder extends Object
Abstract builder for intents.
-
-
Field Summary
Fields Modifier and Type Field Description protected ApplicationId
appId
protected Key
key
protected int
priority
protected ResourceGroup
resourceGroup
protected Collection<NetworkResource>
resources
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Intent.Builder
appId(ApplicationId appId)
Sets the application id for the intent that will be built.Intent.Builder
key(Key key)
Sets the key for the intent that will be built.Intent.Builder
priority(int priority)
Sets the priority for the intent that will be built.Intent.Builder
resourceGroup(ResourceGroup resourceGroup)
Sets the resource group for this intent.Intent.Builder
resources(Collection<NetworkResource> resources)
Sets the collection of resources required for this intent.
-
-
-
Field Detail
-
appId
protected ApplicationId appId
-
key
protected Key key
-
priority
protected int priority
-
resources
protected Collection<NetworkResource> resources
-
resourceGroup
protected ResourceGroup resourceGroup
-
-
Constructor Detail
-
Builder
protected Builder()
Creates a new empty builder.
-
Builder
protected Builder(Intent intent)
Creates a new builder pre-populated with the information in the given intent.- Parameters:
intent
- initial intent
-
-
Method Detail
-
appId
public Intent.Builder appId(ApplicationId appId)
Sets the application id for the intent that will be built.- Parameters:
appId
- application id to use for built intent- Returns:
- this builder
-
key
public Intent.Builder key(Key key)
Sets the key for the intent that will be built.- Parameters:
key
- key to use for built intent- Returns:
- this builder
-
priority
public Intent.Builder priority(int priority)
Sets the priority for the intent that will be built.- Parameters:
priority
- priority to use for built intent- Returns:
- this builder
-
resources
public Intent.Builder resources(Collection<NetworkResource> resources)
Sets the collection of resources required for this intent.- Parameters:
resources
- collection of resources- Returns:
- this builder
-
resourceGroup
public Intent.Builder resourceGroup(ResourceGroup resourceGroup)
Sets the resource group for this intent.- Parameters:
resourceGroup
- the resource group- Returns:
- this builder
-
-