org.jppf.node.policy
Class RegExp
java.lang.Object
org.jppf.node.policy.ExecutionPolicy
org.jppf.node.policy.RegExp
- All Implemented Interfaces:
- Serializable
public class RegExp
- extends ExecutionPolicy
An execution policy rule that encapsulates a test of type property_value matches regular_expression.
The expression syntax must follow the one specified for Pattern.
The test applies to string values only.
- Author:
- Laurent Cohen
- See Also:
- Serialized Form
|
Constructor Summary |
RegExp(String propertyName,
String regExp)
Define an equality comparison between the string value of a property and another string value. |
RegExp
public RegExp(String propertyName,
String regExp)
throws PatternSyntaxException
- Define an equality comparison between the string value of a property and another string value.
- Parameters:
propertyName - the name of the property to compare.regExp - a regular expression to match the property value against.
- Throws:
PatternSyntaxException - if the syntax of expression is invalid
accepts
public boolean accepts(JPPFSystemInformation info)
- Determines whether this policy accepts the specified node.
- Specified by:
accepts in class ExecutionPolicy
- Parameters:
info - system information for the node on which the tasks will run if accepted.
- Returns:
- true if the node is accepted, false otherwise.
- See Also:
ExecutionPolicy.accepts(org.jppf.management.JPPFSystemInformation)
toString
public String toString()
- Print this object to a string.
- Overrides:
toString in class Object
- Returns:
- an XML string representation of this object
- See Also:
Object.toString()
Copyright © 2005-2010 JPPF Team.