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
 java.lang.Runnable getJob()
          Retrieves the job to execute
 int getJobCount()
           
 void resetJobCount()
          Reset the processed job counter
 void setJob(java.lang.Runnable job)
          Sets the job to execute
 void setJob(java.lang.Runnable job, java.security.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(java.lang.Runnable job,
            java.security.AccessControlContext context)
Sets the job to execute in security context


setJob

void setJob(java.lang.Runnable job)
Sets the job to execute


getJob

java.lang.Runnable getJob()
Retrieves the job to execute


start

void start()


Copyright © 1999-2011 The Apache Software Foundation. All Rights Reserved.