tr.linkchecker.url
Class CUrlQueue

java.lang.Object
  extended byjava.lang.Thread
      extended bytr.linkchecker.url.CUrlQueue
All Implemented Interfaces:
java.lang.Runnable
Direct Known Subclasses:
CUrlQueueLocal, CUrlQueueServer

public abstract class CUrlQueue
extends java.lang.Thread

Class that offers methods to the derivative classes

Date: 14.12.2004

Version:
1.0
Author:
Tobias Roessler, Ralf Schmitt

Field Summary
protected  CMediator mMed
           
 
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Constructor Summary
CUrlQueue(java.lang.ThreadGroup tg, java.lang.String name, CMediator med)
          Constructor
 
Method Summary
 void buildLCOutput(java.lang.String tableName, java.util.Vector urlList)
          Build the data for the output
static int getPackageCounter()
           
static int getProcessCounter()
           
protected  void insertPackageStmt(int packagenr, java.lang.String name, long time, long countok, long counterr, int processnr)
          Insert a package-entry in the database
protected  void insertProcessStmt(int processnr, java.lang.String host, java.lang.String port, long runtime)
          Insert a process-entry in the database
 void run()
          Run-Method
static void setPackageCounter(int packageCounter)
          Sets the package-counter
static void setProcessCounter(int processCounter)
          Sets the process-counter
 
Methods inherited from class java.lang.Thread
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getContextClassLoader, getName, getPriority, getThreadGroup, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setName, setPriority, 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

mMed

protected CMediator mMed
Constructor Detail

CUrlQueue

public CUrlQueue(java.lang.ThreadGroup tg,
                 java.lang.String name,
                 CMediator med)
Constructor

Parameters:
tg - ThreadGroup this thread add to
name - Name of the Thread
med - Mediator-object
Method Detail

run

public void run()
Run-Method


buildLCOutput

public void buildLCOutput(java.lang.String tableName,
                          java.util.Vector urlList)
Build the data for the output

Parameters:
tableName - Name of the table
urlList -

setProcessCounter

public static void setProcessCounter(int processCounter)
Sets the process-counter

Parameters:
processCounter - ProcessCounter

setPackageCounter

public static void setPackageCounter(int packageCounter)
Sets the package-counter

Parameters:
packageCounter - PackageCounter

getProcessCounter

public static int getProcessCounter()
Returns:
Returns the process-counter

getPackageCounter

public static int getPackageCounter()
Returns:
Returns the package-counter

insertProcessStmt

protected void insertProcessStmt(int processnr,
                                 java.lang.String host,
                                 java.lang.String port,
                                 long runtime)
Insert a process-entry in the database

Parameters:
processnr - Nr of the process
host - host, in that the process run
port - port, in that the process run
runtime - Time the process run

insertPackageStmt

protected void insertPackageStmt(int packagenr,
                                 java.lang.String name,
                                 long time,
                                 long countok,
                                 long counterr,
                                 int processnr)
Insert a package-entry in the database

Parameters:
packagenr - Nr of the package
name - Name of the table
time - Time the packege-process run
countok - Counts the urls that are ok
counterr - Count the urls that aren't ok
processnr - Nr of the process in which the package run