net.sf.jbatchengine.batch
Class BatchEngine

java.lang.Object
  extended by java.lang.Thread
      extended by net.sf.jbatchengine.batch.BatchEngine
All Implemented Interfaces:
Runnable

public class BatchEngine
extends Thread

BatchEngine

Version:
$Revision: 1.1 $, $Date: 2006/10/20 11:30:59 $
Author:
$Author: simas_ch $

Nested Class Summary
 
Nested classes/interfaces inherited from class java.lang.Thread
Thread.State, Thread.UncaughtExceptionHandler
 
Field Summary
private  Adapter adapter
           
private static int EXIT_VALUE_DEFAULT
           
private static org.apache.log4j.Logger log
           
private  Process process
           
private static Properties prop
           
private static boolean shouldNotRedirect
           
 
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Constructor Summary
private BatchEngine(int threadNumber)
          Constructs a BatchEngine
 
Method Summary
private static void init(String[] args)
          Initializes the BatchEngine and constructs and starts BatchEngine Threads
private static void logUsage(org.apache.commons.cli.Options options)
          If the parameters are not correctly set it displays informations about the options to set
static void main(String[] args)
          The Main method of BatchEngine
private static org.apache.commons.cli.CommandLine parseCommandLineArgs(String[] args)
          Parses the commandline
 void run()
           
private  void terminate()
          Shutdown hook to stop the child processes
 
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
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

log

private static transient org.apache.log4j.Logger log

shouldNotRedirect

private static boolean shouldNotRedirect

prop

private static Properties prop

adapter

private Adapter adapter

process

private Process process

EXIT_VALUE_DEFAULT

private static final int EXIT_VALUE_DEFAULT
See Also:
Constant Field Values
Constructor Detail

BatchEngine

private BatchEngine(int threadNumber)
Constructs a BatchEngine

Parameters:
threadNumber - to indicate thread on logging
Method Detail

main

public static void main(String[] args)
                 throws Exception
The Main method of BatchEngine

Parameters:
args -
Throws:
Exception

run

public void run()
Specified by:
run in interface Runnable
Overrides:
run in class Thread

init

private static void init(String[] args)
                  throws org.apache.commons.cli.ParseException,
                         IOException
Initializes the BatchEngine and constructs and starts BatchEngine Threads

Parameters:
args -
Throws:
org.apache.commons.cli.ParseException
IOException

parseCommandLineArgs

private static org.apache.commons.cli.CommandLine parseCommandLineArgs(String[] args)
                                                                throws org.apache.commons.cli.ParseException
Parses the commandline

Parameters:
args -
Returns:
a CommandLine
Throws:
org.apache.commons.cli.ParseException

logUsage

private static void logUsage(org.apache.commons.cli.Options options)
If the parameters are not correctly set it displays informations about the options to set

Parameters:
options -

terminate

private void terminate()
Shutdown hook to stop the child processes