Package org.jppf.node.policy
Class CustomPolicy
java.lang.Object
org.jppf.node.policy.ExecutionPolicy
org.jppf.node.policy.CustomPolicy
- All Implemented Interfaces:
Serializable
Abstract superclass for all user-defined policies.
- Author:
- Laurent Cohen
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class org.jppf.node.policy.ExecutionPolicy
ExecutionPolicy.AndRule, ExecutionPolicy.NotRule, ExecutionPolicy.OrRule, ExecutionPolicy.XorRule -
Field Summary
Fields inherited from class org.jppf.node.policy.ExecutionPolicy
children -
Constructor Summary
ConstructorsConstructorDescriptionCustomPolicy(String... args) Initialize this policy with the specified arguments. -
Method Summary
Methods inherited from class org.jppf.node.policy.ExecutionPolicy
accepts, and, and, andNot, andNot, checkRules, evaluate, getChildren, getContext, getProperty, indent, negate, not, Not, or, or, orNot, orNot, setContext, setContext, tagEnd, tagStart, toString, toXML, xmlElement, xmlElement, xor, xor
-
Constructor Details
-
CustomPolicy
Initialize this policy with the specified arguments.- Parameters:
args- the user-defined arguments for this policy.
-
-
Method Details
-
initialize
public void initialize()Perform optional initializations. This default implementation does nothing.
This method is called after instantiating the policy object and setting the arguments. It allows for user-defined initializations when the custom policy is built from an XML document. -
getArgs
Get the arguments of this policy.- Returns:
- the arguments as an array of strings.
-
setArgs
Set the arguments of this policy.- Parameters:
args- the arguments as an array of strings.
-
toString
Description copied from class:ExecutionPolicyGet an xml string representation of this policy with the specified starting indentation level.- Specified by:
toStringin classExecutionPolicy- Parameters:
n- the size of the indent to startwith.- Returns:
- an indented string depending on the value of
toStringIndent.
-