Class WaypointConstraint
- java.lang.Object
-
- org.onosproject.net.intent.constraint.PathViabilityConstraint
-
- org.onosproject.net.intent.constraint.WaypointConstraint
-
- All Implemented Interfaces:
Constraint
@Beta public final class WaypointConstraint extends PathViabilityConstraint
Constraint that evaluates elements passed through in order.
-
-
Constructor Summary
Constructors Constructor Description WaypointConstraint(DeviceId... waypoints)
Creates a new waypoint constraint.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(Object obj)
int
hashCode()
String
toString()
boolean
validate(Path path, ResourceContext context)
Validates that the specified path satisfies the constraint.List<DeviceId>
waypoints()
-
Methods inherited from class org.onosproject.net.intent.constraint.PathViabilityConstraint
cost
-
-
-
-
Constructor Detail
-
WaypointConstraint
public WaypointConstraint(DeviceId... waypoints)
Creates a new waypoint constraint.- Parameters:
waypoints
- waypoints
-
-
Method Detail
-
validate
public boolean validate(Path path, ResourceContext context)
Description copied from interface:Constraint
Validates that the specified path satisfies the constraint.- Parameters:
path
- path to be validatedcontext
- resource context for validating availability of resources- Returns:
- cost of link traversal
-
-