Class AutoSubmitEngine

java.lang.Object
  |
  +--java.lang.Thread
        |
        +--AutoSubmitEngine
All Implemented Interfaces:
java.lang.Runnable

public class AutoSubmitEngine
extends java.lang.Thread

This class is a Singleton Thread that carries out the automatic submission of Querys. This class sleeps most of the day and wakes up to submit Querys just after midnight. Whether Querys are actually submitted depends on the settings in each Query's QueryDescriptor object. All Querys in the BioQuery user directory are checked.

Author:
James Brundege

Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Method Summary
static void main(java.lang.String[] args)
          main simply calls shutDownEngine which gives an alternate way to shut down the AutoSubmitEngine Thread (by typing in the command line of the server: java AutoSubmitEngine.
 void run()
          This Thread periodically checks the time, and just after midnight begins asking Query files if it is time to autosubmit them.
static void shutDownEngine()
          Shuts down the AutoSubmitEngine and terminates the Thread.
static void startAutoSubmitEngine(java.lang.String bioqueryDirectory)
          Starts the AutoSubmitEngine, which runs forever as a separate Thread.
 
Methods inherited from class java.lang.Thread
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getContextClassLoader, getName, getPriority, getThreadGroup, 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
 

Method Detail

startAutoSubmitEngine

public static void startAutoSubmitEngine(java.lang.String bioqueryDirectory)
Starts the AutoSubmitEngine, which runs forever as a separate Thread. Since AutoSubmitEngine is a Singleton, if an AutoSubmitEngine is already running in the Virtual Machine it returns with no effect.

shutDownEngine

public static void shutDownEngine()
Shuts down the AutoSubmitEngine and terminates the Thread.

run

public void run()
This Thread periodically checks the time, and just after midnight begins asking Query files if it is time to autosubmit them. If so, it submits the Query, sends the results to the user, updates the QueryDescriptor, and resaves the file.
Overrides:
run in class java.lang.Thread

main

public static void main(java.lang.String[] args)

main simply calls shutDownEngine which gives an alternate way to shut down the AutoSubmitEngine Thread (by typing in the command line of the server: java AutoSubmitEngine.

Please note that the FileManagerServlet restarts the AutoSubmitEngine whenever a user logs into the server!