Package org.java.plugin.boot
Interface ApplicationInitializer
-
- All Known Implementing Classes:
DefaultApplicationInitializer
public interface ApplicationInitializer
Interface to plug custom code into JPF based application boot procedure. The implementation should contain logic on configuring and initializing (but not starting) application.- Version:
- $Id$
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
configure(ExtendedProperties config)
Configures this initializer instance, this method will be called once before any other method call in this class.Application
initApplication(BootErrorHandler errorHandler, java.lang.String[] args)
This method should configure and initialize an application instance to be started.
-
-
-
Method Detail
-
configure
void configure(ExtendedProperties config) throws java.lang.Exception
Configures this initializer instance, this method will be called once before any other method call in this class. There is no pre-defined configuration parameters, see concrete implementations for supported parameters.- Parameters:
config
- application configuration data fromboot.properties
file andSystem
properties as defaults- Throws:
java.lang.Exception
- if any error has occurred during initializer configuring
-
initApplication
Application initApplication(BootErrorHandler errorHandler, java.lang.String[] args) throws java.lang.Exception
This method should configure and initialize an application instance to be started.- Parameters:
errorHandler
- callback interface to report errors to the user, it is recommended to use this handler only for "non-fatal" errors and ask user viaBootErrorHandler.handleError(String, Exception)
orBootErrorHandler.handleError(String, org.java.plugin.registry.IntegrityCheckReport)
if he wants to abort application boot processargs
- command line arguments as they passed to programmain
method- Returns:
- initialized application instance or
null
if initializing failed - Throws:
java.lang.Exception
- if any error has occurred during application initializing
-
-