DESY ACOP Beans Home

com.cosylab.util
Interface SchedulerTask

All Superinterfaces:
java.lang.Runnable
All Known Implementing Classes:
AbstractSchedulerTask

Deprecated. Use concurency from Java 1.5 instead.

public interface SchedulerTask
extends java.lang.Runnable

Interface that defines a task that can be run by Scheduler.

Version:
$id$
Author:
Ales Pucelj

Method Summary
 void cancel()
          Deprecated. This task should be canceled at first available oportunity.
 long getInterval()
          Deprecated. Interval between two executions.
 java.lang.String getTaskName()
          Deprecated. Returns name of this task.
 boolean isCanceled()
          Deprecated. Returns true if this task is scheduled for canceling.
 void run()
          Deprecated. Method that runs this task.
 

Method Detail

cancel

void cancel()
Deprecated. 
This task should be canceled at first available oportunity.


isCanceled

boolean isCanceled()
Deprecated. 
Returns true if this task is scheduled for canceling. One canceled returns true, this task will never be executed again. If task is running currently, it will finish, then be destroyed.

Returns:
True if the task should be destroyed.

getTaskName

java.lang.String getTaskName()
Deprecated. 
Returns name of this task. This name is for informative purposes only. Can be null. If specified it can aid in debugging, since the thread executing this task can be identified.

Returns:
Name Name of this task or null.

getInterval

long getInterval()
Deprecated. 
Interval between two executions. This value indicates the desired time between to calls to run() method. If value is negative, the task will be executed at next available oportunity.

If this value is changed while task is already scheduled, changes will take effect after this task is run next time.

Returns:
Time in miliseconds.

run

void run()
Deprecated. 
Method that runs this task. Deliberately made to clash with Thread.run() to prevent this class to be implemented as a Thread or Runnable.

Specified by:
run in interface java.lang.Runnable


Copyright © 2010. All Rights Reserved.