|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.rhi.architecture.batch.AbstractApplication
This class provides a partial implementation of the application interface for use by sub-classes. Basically an execute() method following the Template GOF pattern is used to call the initialization & cleanup methods on the applications object.
Resources should be allocated & configured in the init() method. The same resources should be deallocated in the cleanup() method, and the processing logic should be performed w/in the run() method.
Field Summary |
Fields inherited from interface com.rhi.architecture.batch.Application |
FATAL_EXCEPTION, SUCCESS, SUCCESS_WITH_EXCEPTION |
Constructor Summary | |
AbstractApplication()
|
Method Summary | |
protected abstract void |
cleanup()
Perform any cleanup required by the application framework. |
void |
execute(java.lang.String[] args)
Start application. |
protected abstract void |
init(java.lang.String[] args)
Perform initialization required by the application framework. |
Logger |
log()
Logs a msg. |
protected abstract void |
run()
The run() method is expected to be overriden by concrete sub-classes. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public AbstractApplication()
Method Detail |
public final void execute(java.lang.String[] args) throws ApplicationException
execute
in interface Application
args
- commandline arguments.
ApplicationException
- fatal errorprotected abstract void init(java.lang.String[] args) throws InitializationException
args
- commandline arguments
InitializationException
- error initializing the process.protected abstract void cleanup()
protected abstract void run() throws ApplicationException
ApplicationException
- a fatal error occured during processing.public Logger log()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |