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

int getJobCount()

resetJobCount

void resetJobCount()
Reset the processed job counter


setRunning

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

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


setJob

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


setJob

void setJob(Runnable job)
Sets the job to execute


getJob

Runnable getJob()
Retrieves the job to execute


start

void start()


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