Package org.eclipse.rap.rwt.application
Class ApplicationRunner
- java.lang.Object
-
- org.eclipse.rap.rwt.application.ApplicationRunner
-
public class ApplicationRunner extends java.lang.ObjectAnApplicationRunneris used to start an RWT application with the givenApplicationConfigurationin the givenServletContext.In most cases, application developers don't have to use this class directly. Instead of this, the class
RWTServletContextListenercan be registered as a listener in the deployment descriptor (web.xml). In this case, theApplicationConfigurationdefined in the init-parameterorg.eclipse.rap.applicationConfigurationwill be started by the framework.When a custom
ServletContextListeneris used, theApplicationRunneris usually constructed and started in thecontextInitialized()method and stopped in thecontextDestroyed()method.- Since:
- 2.0
- See Also:
ApplicationConfiguration,RWTServletContextListener,javax.servlet.ServletContext,javax.servlet.ServletContextListener
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringRESOURCES
-
Constructor Summary
Constructors Constructor Description ApplicationRunner(ApplicationConfiguration configuration, ServletContext servletContext)Constructs a new instance of this class given an application configuration and the servlet context it is bound to.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ApplicationContextgetApplicationContext()Returns theApplicationContextof the running application that is controlled by this application runner.voidstart()Starts the application if it is not running.voidstop()Stops the application if it is running.
-
-
-
Constructor Detail
-
ApplicationRunner
public ApplicationRunner(ApplicationConfiguration configuration, ServletContext servletContext)
Constructs a new instance of this class given an application configuration and the servlet context it is bound to.- Parameters:
configuration- the configuration for the application to start. Must not benull.servletContext- the servlet context this application is bound to. Must not benull.
-
-
Method Detail
-
start
public void start()
Starts the application if it is not running. If the application is already running, this method does nothing.
-
stop
public void stop()
Stops the application if it is running. If the application is not running, this method does nothing.
-
getApplicationContext
public ApplicationContext getApplicationContext()
Returns theApplicationContextof the running application that is controlled by this application runner. If the application is not running, this method will returnnull.- Returns:
- the
ApplicationContextof the running application ornullif the application is not running - Since:
- 3.0
-
-