Class CustomPolicy

java.lang.Object
org.jppf.node.policy.ExecutionPolicy
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:
  • Constructor Details

    • CustomPolicy

      public CustomPolicy(String... args)
      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

      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(int n)
      Description copied from class: ExecutionPolicy
      Get an xml string representation of this policy with the specified starting indentation level.
      Specified by:
      toString in class ExecutionPolicy
      Parameters:
      n - the size of the indent to startwith.
      Returns:
      an indented string depending on the value of toStringIndent.