Interface TaskConfiguration


public interface TaskConfiguration
This interface defines the properties that can be provided to a task submitted by a JPPFExecutorService and that is not a Task instance. These properties include:
  • the task expiration schedule
  • a callback that will replace the task's onTimeout() method
  • a callback that will replace the task's onCancel() method
Author:
Laurent Cohen
  • Method Details

    • getOnCancelCallback

      org.jppf.client.taskwrapper.JPPFTaskCallback<Object> getOnCancelCallback()
      Get the delegate for the onCancel() method.
      Returns:
      a JPPFTaskCallback instance.
    • setOnCancelCallback

      TaskConfiguration setOnCancelCallback(org.jppf.client.taskwrapper.JPPFTaskCallback<Object> cancelCallback)
      Set the delegate for the onCancel() method.
      Parameters:
      cancelCallback - a JPPFTaskCallback instance.
      Returns:
      this task configuration, for method chaining.
    • getOnTimeoutCallback

      org.jppf.client.taskwrapper.JPPFTaskCallback<Object> getOnTimeoutCallback()
      Get the delegate for the onTimeout() method.
      Returns:
      a JPPFTaskCallback instance.
    • setOnTimeoutCallback

      TaskConfiguration setOnTimeoutCallback(org.jppf.client.taskwrapper.JPPFTaskCallback<Object> timeoutCallback)
      Set the delegate for the onTimeout() method.
      Parameters:
      timeoutCallback - a JPPFTaskCallback instance.
      Returns:
      this task configuration, for method chaining.
    • getTimeoutSchedule

      org.jppf.scheduling.JPPFSchedule getTimeoutSchedule()
      Get the timeout set on the task.
      Returns:
      a JPPFSchedule instance, or null if no timeout was set.
    • setTimeoutSchedule

      TaskConfiguration setTimeoutSchedule(org.jppf.scheduling.JPPFSchedule timeoutSchedule)
      Set the timeout set on the task.
      Parameters:
      timeoutSchedule - a JPPFSchedule instance.
      Returns:
      this task configuration, for method chaining.