org.apache.jetspeed.aggregator
Interface Worker


public interface Worker

Worker thread processes jobs and notify its WorkerMonitor when completed. When no work is available, the worker simply sets itself in a waiting mode pending reactivation by the WorkerMonitor

Version:
$Id: $
Author:
David Sean Taylor

Method Summary
 Runnable getJob()
          Retrieves the job to execute
 int getJobCount()
           
 void resetJobCount()
          Reset the processed job counter
 void setJob(Runnable job)
          Sets the job to execute
 void setJob(Runnable job, AccessControlContext context)
          Sets the job to execute in security context
 void setMonitor(WorkerMonitor monitor)
          Sets the moitor of this worker
 void setRunning(boolean status)
          Sets the running status of this Worker.
 void start()
           
 

Method Detail

getJobCount

public int getJobCount()

resetJobCount

public void resetJobCount()
Reset the processed job counter


setRunning

public void setRunning(boolean status)
Sets the running status of this Worker. If set to false, the Worker will stop after processing its current job.


setMonitor

public void setMonitor(WorkerMonitor monitor)
Sets the moitor of this worker


setJob

public void setJob(Runnable job,
                   AccessControlContext context)
Sets the job to execute in security context


setJob

public void setJob(Runnable job)
Sets the job to execute


getJob

public Runnable getJob()
Retrieves the job to execute


start

public void start()


Copyright © 1999-2005 Apache Software Foundation. All Rights Reserved.