au.gov.naa.digipres.rollingchecker
Class CheckerServer
java.lang.Object
  extended by java.lang.Thread
      extended by au.gov.naa.digipres.rollingchecker.CheckerServer
All Implemented Interfaces:
java.lang.Runnable

public class CheckerServer
extends java.lang.Thread

A class that can be run as a service to perform checksum checking of the AIPs in the repository. The program provides a socket interface to enable clients to retrieve status updates and to interact with the server.


Nested Class Summary
 
Nested classes/interfaces inherited from class java.lang.Thread
java.lang.Thread.State, java.lang.Thread.UncaughtExceptionHandler
 
Field Summary
static int numWorkers
           
 
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Constructor Summary
CheckerServer(java.util.Properties configProperties)
          Initialises the server (including logging, the email sender and the checksum checker) and then begin listening for incoming client connections.
 
Method Summary
 int getPort()
           
 java.util.Vector<CheckerServerWorker> getWorkerPool()
           
static void main(java.lang.String[] args)
           
 void shutdownServer()
          Shut down the web server.
 
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, run, 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

numWorkers

public static int numWorkers
Constructor Detail

CheckerServer

public CheckerServer(java.util.Properties configProperties)
              throws java.io.IOException,
                     MessagingException,
                     java.sql.SQLException
Initialises the server (including logging, the email sender and the checksum checker) and then begin listening for incoming client connections.

Parameters:
configProperties -
Throws:
java.io.IOException
MessagingException
java.sql.SQLException
Method Detail

shutdownServer

public void shutdownServer()
Shut down the web server. This simply sets the running field to false, which will cause the main thread loop to end, and the worker threads to be stopped.


getPort

public int getPort()

getWorkerPool

public java.util.Vector<CheckerServerWorker> getWorkerPool()

main

public static void main(java.lang.String[] args)
                 throws java.io.IOException,
                        MessagingException,
                        java.sql.SQLException
Throws:
java.io.IOException
MessagingException
java.sql.SQLException