org.niocchi.core
Class Worker

java.lang.Object
  extended by java.lang.Thread
      extended by org.niocchi.core.Worker
All Implemented Interfaces:
java.lang.Runnable
Direct Known Subclasses:
GenericWorker

public abstract class Worker
extends java.lang.Thread

Subclass this and implement processResource() to do the work.


Nested Class Summary
 
Nested classes/interfaces inherited from class java.lang.Thread
java.lang.Thread.State, java.lang.Thread.UncaughtExceptionHandler
 
Field Summary
 
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Constructor Summary
Worker(Crawler crawler_)
           
 
Method Summary
abstract  void processResource(Query query)
          This method will be called on each completed query, either in error or with a successfully crawled resource
 void run()
          Starts the worker.
 
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
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Worker

public Worker(Crawler crawler_)
Method Detail

processResource

public abstract void processResource(Query query)
This method will be called on each completed query, either in error or with a successfully crawled resource


run

public void run()
Starts the worker.

Specified by:
run in interface java.lang.Runnable
Overrides:
run in class java.lang.Thread