|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.springframework.richclient.application.ApplicationLauncher
public class ApplicationLauncher
The main driver for a Spring Rich Client application.
This class displays a configurable splash screen and launches a rich client
Application
. Both the splash screen and the application to be
launched are expected to be defined as beans, under the names
"splashScreen" and "application"
respectively, in one of the application contexts provided to the constructor.
For quick loading and display of the splash screen while the rest of the application is being initialized, constructors are provided that take a separate startup context. The startup context will be searched for the "splashScreen" bean, which will then be displayed before the main application context is loaded and the application launched. If no startup context is provided or it doesn't contain an appropriately named splash screen bean, an attempt will be made to load a splash screen from the main application context. This can only happen after the main application context has been loaded in its entirety so it is not the recommended approach for displaying a splash screen.
Application
Field Summary | |
---|---|
static String |
APPLICATION_BEAN_ID
The name of the bean that defines the Application that this class
will launch. |
static String |
SPLASH_SCREEN_BEAN_ID
The name of the bean that defines the application's splash screen. |
Constructor Summary | |
---|---|
ApplicationLauncher(ApplicationContext rootApplicationContext)
Launches the application from the pre-loaded application context. |
|
ApplicationLauncher(String rootContextPath)
Launches the application defined by the Spring application context file at the provided classpath-relative location. |
|
ApplicationLauncher(String[] rootContextConfigLocations)
Launches the application defined by the Spring application context files at the provided classpath-relative locations. |
|
ApplicationLauncher(String startupContextPath,
ApplicationContext rootApplicationContext)
Launch the application using a startup context from the given location and a pre-loaded application context. |
|
ApplicationLauncher(String startupContextPath,
String rootContextPath)
Launches the application defined by the Spring application context files at the provided classpath-relative locations. |
|
ApplicationLauncher(String startupContextPath,
String[] rootContextConfigLocations)
Launches the application defined by the Spring application context files at the provided classpath-relative locations. |
Method Summary |
---|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String SPLASH_SCREEN_BEAN_ID
public static final String APPLICATION_BEAN_ID
Application
that this class
will launch.
Constructor Detail |
---|
public ApplicationLauncher(String rootContextPath)
rootContextPath
- The classpath-relative location of the application context file.
IllegalArgumentException
- if rootContextPath
is null or empty.public ApplicationLauncher(String[] rootContextConfigLocations)
rootContextConfigLocations
- the classpath-relative locations of the
application context files.
IllegalArgumentException
- if rootContextPath
is null or empty.public ApplicationLauncher(String startupContextPath, String rootContextPath)
startupContext
is loaded first to allow for
quick loading of the application splash screen. It is recommended that
the startup context only contains the bean definition for the splash
screen and any other beans that it depends upon. Any beans defined in the
startup context will not be available to the main application once
launched.
startupContextPath
- The classpath-relative location of the startup
application context file. May be null or empty.rootContextPath
- The classpath-relative location of the main
application context file.
IllegalArgumentException
- if rootContextPath
is null or empty.public ApplicationLauncher(String startupContextPath, String[] rootContextConfigLocations)
startupContextPath
is loaded first to allow for
quick loading of the application splash screen. It is recommended that
the startup context only contains the bean definition for the splash
screen and any other beans that it depends upon. Any beans defined in the
startup context will not be available to the main application once
launched.
startupContextPath
- The classpath-relative location of the startup
context file. May be null or empty.rootContextConfigLocations
- The classpath-relative locations of the main
application context files.
IllegalArgumentException
- if rootContextConfigLocations
is null or empty.public ApplicationLauncher(ApplicationContext rootApplicationContext)
rootApplicationContext
- The main application context.
IllegalArgumentException
- if rootApplicationContext
is
null.public ApplicationLauncher(String startupContextPath, ApplicationContext rootApplicationContext)
startupContextPath
- the classpath-relative location of the starup
application context file. If null or empty, no splash screen will be
displayed.rootApplicationContext
- the main application context.
IllegalArgumentException
- if rootApplicationContext
is
null.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |