Package org.onosproject.net.intent
Class ConnectivityIntent.Builder
- java.lang.Object
-
- org.onosproject.net.intent.Intent.Builder
-
- org.onosproject.net.intent.ConnectivityIntent.Builder
-
- Direct Known Subclasses:
HostToHostIntent.Builder
,LinkCollectionIntent.Builder
,MultiPointToSinglePointIntent.Builder
,PathIntent.Builder
,PointToPointIntent.Builder
,ProtectedTransportIntent.Builder
,SinglePointToMultiPointIntent.Builder
,TwoWayP2PIntent.Builder
- Enclosing class:
- ConnectivityIntent
public abstract static class ConnectivityIntent.Builder extends Intent.Builder
Abstract builder for connectivity intents.
-
-
Field Summary
Fields Modifier and Type Field Description protected List<Constraint>
constraints
protected TrafficSelector
selector
protected TrafficTreatment
treatment
-
Fields inherited from class org.onosproject.net.intent.Intent.Builder
appId, key, priority, resourceGroup, resources
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
Builder()
Creates a new empty builder.protected
Builder(ConnectivityIntent intent)
Creates a new builder pre-populated with the information in the given intent.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ConnectivityIntent.Builder
appId(ApplicationId appId)
Sets the application id for the intent that will be built.ConnectivityIntent.Builder
constraints(List<Constraint> constraints)
Sets the constraints for the intent that will be built.ConnectivityIntent.Builder
key(Key key)
Sets the key for the intent that will be built.ConnectivityIntent.Builder
priority(int priority)
Sets the priority for the intent that will be built.ConnectivityIntent.Builder
selector(TrafficSelector selector)
Sets the traffic selector for the intent that will be built.ConnectivityIntent.Builder
treatment(TrafficTreatment treatment)
Sets the traffic treatment for the intent that will be built.-
Methods inherited from class org.onosproject.net.intent.Intent.Builder
resourceGroup, resources
-
-
-
-
Field Detail
-
selector
protected TrafficSelector selector
-
treatment
protected TrafficTreatment treatment
-
constraints
protected List<Constraint> constraints
-
-
Constructor Detail
-
Builder
protected Builder()
Creates a new empty builder.
-
Builder
protected Builder(ConnectivityIntent intent)
Creates a new builder pre-populated with the information in the given intent.- Parameters:
intent
- initial intent
-
-
Method Detail
-
appId
public ConnectivityIntent.Builder appId(ApplicationId appId)
Description copied from class:Intent.Builder
Sets the application id for the intent that will be built.- Overrides:
appId
in classIntent.Builder
- Parameters:
appId
- application id to use for built intent- Returns:
- this builder
-
key
public ConnectivityIntent.Builder key(Key key)
Description copied from class:Intent.Builder
Sets the key for the intent that will be built.- Overrides:
key
in classIntent.Builder
- Parameters:
key
- key to use for built intent- Returns:
- this builder
-
priority
public ConnectivityIntent.Builder priority(int priority)
Description copied from class:Intent.Builder
Sets the priority for the intent that will be built.- Overrides:
priority
in classIntent.Builder
- Parameters:
priority
- priority to use for built intent- Returns:
- this builder
-
selector
public ConnectivityIntent.Builder selector(TrafficSelector selector)
Sets the traffic selector for the intent that will be built.- Parameters:
selector
- selector to use for built intent- Returns:
- this builder
-
treatment
public ConnectivityIntent.Builder treatment(TrafficTreatment treatment)
Sets the traffic treatment for the intent that will be built.- Parameters:
treatment
- treatment to use for built intent- Returns:
- this builder
-
constraints
public ConnectivityIntent.Builder constraints(List<Constraint> constraints)
Sets the constraints for the intent that will be built.- Parameters:
constraints
- constraints to use for built intent- Returns:
- this builder
-
-