org.jppf.node.policy
Class CustomPolicy

java.lang.Object
  extended by org.jppf.node.policy.ExecutionPolicy
      extended by org.jppf.node.policy.CustomPolicy
All Implemented Interfaces:
Serializable

public abstract class CustomPolicy
extends ExecutionPolicy

Abstract superclass for all user-defined policies.

Author:
Laurent Cohen
See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class org.jppf.node.policy.ExecutionPolicy
ExecutionPolicy.AndRule, ExecutionPolicy.LogicalRule, ExecutionPolicy.NotRule, ExecutionPolicy.OrRule, ExecutionPolicy.XorRule
 
Field Summary
 
Fields inherited from class org.jppf.node.policy.ExecutionPolicy
computedToString
 
Constructor Summary
CustomPolicy(String... args)
          Initialize this policy with the specified arguments.
 
Method Summary
 String[] getArgs()
          Get the arguments of this policy.
 void initialize()
          Perform optional initializations.
 void setArgs(String... args)
          Set the arguments of this policy.
 String toString()
          Print this object to a string.
 
Methods inherited from class org.jppf.node.policy.ExecutionPolicy
accepts, and, getProperty, indent, not, or, xor
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

CustomPolicy

public CustomPolicy(String... args)
Initialize this policy with the specified arguments.

Parameters:
args - the user-defined arguments for this policy.
Method Detail

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

public final String[] getArgs()
Get the arguments of this policy.

Returns:
the arguments as an array of strings.

setArgs

public final void setArgs(String... args)
Set the arguments of this policy.

Parameters:
args - the arguments as an array of strings.

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.