org.jppf.utils
Class SynchronizedTask

java.lang.Object
  extended by org.jppf.utils.SynchronizedTask
All Implemented Interfaces:
Runnable
Direct Known Subclasses:
JobDataPanel.RefreshTask

public abstract class SynchronizedTask
extends Object
implements Runnable

Task that is submitted for each received notification.


Constructor Summary
SynchronizedTask(Object sync)
          Initialize this task with an object to synchronize against.
 
Method Summary
abstract  void perform()
          Execute the task.
 void run()
          Wrap the task execution within a synchronized block within a try/catch block.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SynchronizedTask

public SynchronizedTask(Object sync)
Initialize this task with an object to synchronize against.

Parameters:
sync - - an object to synchronize against.
Method Detail

run

public void run()
Wrap the task execution within a synchronized block within a try/catch block.

Specified by:
run in interface Runnable
See Also:
Runnable.run()

perform

public abstract void perform()
                      throws Exception
Execute the task.

Throws:
Exception - if any error occurs.


Copyright © 2005-2010 JPPF Team.