Class ProtectedConstraint
- java.lang.Object
-
- org.onosproject.net.intent.constraint.BooleanConstraint
-
- org.onosproject.net.intent.constraint.ProtectedConstraint
-
- All Implemented Interfaces:
Constraint
public class ProtectedConstraint extends BooleanConstraint
Constraint to request using onlyprotected
Links.
-
-
Constructor Summary
Constructors Constructor Description ProtectedConstraint()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
isValid(Link link, ResourceContext context)
Returns true if the specified link satisfies the constraint.java.lang.String
toString()
static ProtectedConstraint
useProtectedLink()
ReturnsProtectedConstraint
instance.-
Methods inherited from class org.onosproject.net.intent.constraint.BooleanConstraint
cost, validate
-
-
-
-
Method Detail
-
useProtectedLink
public static ProtectedConstraint useProtectedLink()
ReturnsProtectedConstraint
instance.- Returns:
ProtectedConstraint
instance
-
isValid
public boolean isValid(Link link, ResourceContext context)
Description copied from class:BooleanConstraint
Returns true if the specified link satisfies the constraint.- Specified by:
isValid
in classBooleanConstraint
- Parameters:
link
- link to be validatedcontext
- resource context for checking available resources- Returns:
- true if link is viable
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-