SMILA 1.0 API documentation

org.eclipse.smila.connectivity.framework.impl
Class CrawlThread

java.lang.Object
  extended by java.lang.Thread
      extended by org.eclipse.smila.connectivity.framework.impl.CrawlThread
All Implemented Interfaces:
java.lang.Runnable

public class CrawlThread
extends java.lang.Thread

The Class CrawlThread.


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
CrawlThread(CrawlerControllerCallback controllerCallback, CrawlState crawlState, ConnectivityManager connectivityManager, DeltaIndexingManager diManager, CompoundManager compoundManager, Crawler crawler, DataSourceConnectionConfig configuration, java.lang.String jobName)
          Constructor.
 
Method Summary
protected  void cleanupRun()
          Close the conversation with the crawler.
 CrawlerPerformanceCounterHelper<? extends ConnectivityPerformanceAgent> getCrawlerCounterHelper()
           
protected  void initializeRun()
          initializies the CrawlThread for running.
protected  void processDataReference(DataReference dataReference)
          process a single data reference object.
 void run()
          
 void stopCrawl()
          Stop the execution of this CrawlThread.
protected  void updateDataReference(DataReference dataReference)
          update a single data reference.
 
Methods inherited from class java.lang.Thread
activeCount, checkAccess, clone, 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, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

CrawlThread

public CrawlThread(CrawlerControllerCallback controllerCallback,
                   CrawlState crawlState,
                   ConnectivityManager connectivityManager,
                   DeltaIndexingManager diManager,
                   CompoundManager compoundManager,
                   Crawler crawler,
                   DataSourceConnectionConfig configuration,
                   java.lang.String jobName)
            throws DeltaIndexingException,
                   CrawlerCriticalException
Constructor.

Parameters:
controllerCallback - the callback to the CrawlerController
crawlState - the CrawlState
connectivityManager - the ConnectivityManager
diManager - the DeltaIndexingManager
compoundManager - the CompoundManager
crawler - the Crawler
configuration - the DataSourceConnectionConfig
jobName - the job for which to submit the crawled records
Throws:
DeltaIndexingException - if DeltaIndexing is enabled and no DeltaIndexing session can be initialized
CrawlerCriticalException
Method Detail

run

public void run()

Specified by:
run in interface java.lang.Runnable
Overrides:
run in class java.lang.Thread
See Also:
Thread.run()

cleanupRun

protected void cleanupRun()
Close the conversation with the crawler. Unregisters the crawl threrad and set end time.


initializeRun

protected void initializeRun()
                      throws DeltaIndexingException,
                             CrawlerCriticalException
initializies the CrawlThread for running.

Throws:
DeltaIndexingException
CrawlerCriticalException

processDataReference

protected void processDataReference(DataReference dataReference)
                             throws CrawlerCriticalException
process a single data reference object.

Parameters:
dataReference - the data reference object to process
Throws:
CrawlerCriticalException - a critical exception occurred while processing the data reference

updateDataReference

protected void updateDataReference(DataReference dataReference)
                            throws CrawlerException,
                                   CrawlerCriticalException,
                                   DeltaIndexingSessionException,
                                   DeltaIndexingException
update a single data reference.

Parameters:
dataReference - the data reference to update
Throws:
CrawlerException
CrawlerCriticalException
DeltaIndexingSessionException
DeltaIndexingException

stopCrawl

public void stopCrawl()
Stop the execution of this CrawlThread.


getCrawlerCounterHelper

public CrawlerPerformanceCounterHelper<? extends ConnectivityPerformanceAgent> getCrawlerCounterHelper()
Returns:
helper for crawler counters.

SMILA 1.0 API documentation