com.virtuosotechnologies.lib.asyncjob
Class AbstractAsyncJobRunner

java.lang.Object
  extended bycom.virtuosotechnologies.lib.asyncjob.AbstractAsyncJobRunner
All Implemented Interfaces:
AsyncJobRunner
Direct Known Subclasses:
BlockingAsyncJobRunner, ThreadSpawningAsyncJobRunner, ThreadWorkerAsyncJobRunner

public abstract class AbstractAsyncJobRunner
extends Object
implements AsyncJobRunner

Abstract base class for AsyncJobRunner. Provides the event broadcasting mechanism, a basic implementation of AsyncJobExecution, and a helper method for running a job synchronously. Subclasses should implement startJob() to provide the run semantics.


Nested Class Summary
protected  class AbstractAsyncJobRunner.ExecutionImpl
          Basic execution tracker implementation.
 
Constructor Summary
protected AbstractAsyncJobRunner()
          Constructor
 
Method Summary
 void addAsyncJobListener(AsyncJobListener listener)
          Add a job listener.
 void removeAsyncJobListener(AsyncJobListener listener)
          Remove a job listener.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.virtuosotechnologies.lib.asyncjob.AsyncJobRunner
startJob
 

Constructor Detail

AbstractAsyncJobRunner

protected AbstractAsyncJobRunner()
Constructor

Method Detail

addAsyncJobListener

public void addAsyncJobListener(AsyncJobListener listener)
Add a job listener.

Specified by:
addAsyncJobListener in interface AsyncJobRunner
Parameters:
listener - listener to add

removeAsyncJobListener

public void removeAsyncJobListener(AsyncJobListener listener)
Remove a job listener.

Specified by:
removeAsyncJobListener in interface AsyncJobRunner
Parameters:
listener - listener to remove