tigase.util
Class WorkerThread

java.lang.Object
  extended by java.lang.Thread
      extended by tigase.util.WorkerThread
All Implemented Interfaces:
java.lang.Runnable

public abstract class WorkerThread
extends java.lang.Thread

Created: Apr 21, 2009 9:02:57 PM

Version:
$Rev: 1576 $
Author:
Artur Hefczyc

Nested Class Summary
 
Nested classes/interfaces inherited from class java.lang.Thread
java.lang.Thread.State, java.lang.Thread.UncaughtExceptionHandler
 
Field Summary
protected static java.util.logging.Logger log
          Variable log is a class logger.
 
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Constructor Summary
WorkerThread()
           
 
Method Summary
 long getAverageProcessingTime()
           
abstract  WorkerThread getNewInstance(PriorityQueue<QueueItem> queue)
           
 long getRunsCounter()
           
abstract  void process(QueueItem item)
           
 void run()
           
 void setQueue(PriorityQueue<QueueItem> queue)
           
 
Methods inherited from class java.lang.Thread
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yield
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

log

protected static final java.util.logging.Logger log
Variable log is a class logger.

Constructor Detail

WorkerThread

public WorkerThread()
Method Detail

getNewInstance

public abstract WorkerThread getNewInstance(PriorityQueue<QueueItem> queue)

setQueue

public void setQueue(PriorityQueue<QueueItem> queue)

process

public abstract void process(QueueItem item)

run

public void run()
Specified by:
run in interface java.lang.Runnable
Overrides:
run in class java.lang.Thread

getAverageProcessingTime

public long getAverageProcessingTime()

getRunsCounter

public long getRunsCounter()


Copyright © 2009 Tigase. All Rights Reserved.