|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.xbean.server.spring.main.SpringBootstrap
SpringBootstrap is the main class used by a Spring based server. This class uses the following strategies to determine the configuration file to load: Command line parameter --bootstrap FILE Manifest entry XBean-Bootstrap in the startup jar META-INF/xbean-bootstrap.xml This class atempts to first load the configuration file from the local file system and if that fails it attempts to load it from the classpath. SpringBootstrap expects the configuration to contain a service with the id "main" which is an implementation of org.apache.xbean.server.main.Main. This class will set the system property xbean.base.dir to the directory containing the startup jar if the property has not alredy been set (on the command line).
Constructor Summary | |
SpringBootstrap()
|
Method Summary | |
void |
boot()
Loads the main instance from the Spring configuration file and executes it. |
java.lang.String |
getConfigurationFile()
Gets the configuration file from which the main instance is loaded. |
java.lang.String[] |
getMainArguments()
Gets the arguments passed to the main instance. |
java.util.List |
getPropertyEditorPaths()
Gets the paths that are appended to the system property editors search path. |
java.lang.String |
getServerBaseDirectory()
Gets the base directory of the server. |
void |
initialize(java.lang.String[] args)
Determines the configuration file and server base directory. |
Main |
loadMain()
Loads the main instance from the configuration file. |
static void |
main(java.lang.String[] args)
Initializes and boots the server using the supplied arguments. |
static void |
main(java.lang.String[] args,
SpringBootstrap springBootstrap)
Like the main(args) method but allows a configured bootstrap instance to be passed in. |
void |
setConfigurationFile(java.lang.String configurationFile)
Sets the configuration file from which the main instance is loaded. |
void |
setMainArguments(java.lang.String[] mainArguments)
Sets the arguments passed to the main instance. |
void |
setPropertyEditorPaths(java.util.List propertyEditorPaths)
Sets the paths that are appended to the system property editors search path. |
void |
setServerBaseDirectory(java.lang.String serverBaseDirectory)
Sets the base directory of the server. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public SpringBootstrap()
Method Detail |
public static void main(java.lang.String[] args)
args
- the arguments used to start the serverpublic static void main(java.lang.String[] args, SpringBootstrap springBootstrap)
main(String[])
public java.lang.String getConfigurationFile()
public void setConfigurationFile(java.lang.String configurationFile)
configurationFile
- the configuration file from which the main instance is loadedpublic java.lang.String[] getMainArguments()
public void setMainArguments(java.lang.String[] mainArguments)
mainArguments
- the arguments passed to the main instancepublic java.util.List getPropertyEditorPaths()
public void setPropertyEditorPaths(java.util.List propertyEditorPaths)
propertyEditorPaths
- the paths that are appended to the system property editors search pathpublic java.lang.String getServerBaseDirectory()
public void setServerBaseDirectory(java.lang.String serverBaseDirectory)
serverBaseDirectory
- the base directory of the serverpublic void initialize(java.lang.String[] args)
args
- the arguments passed to mainpublic Main loadMain()
public void boot()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |