|
Eclipse Rich Ajax Platform | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.eclipse.rwt.application.Application
public class Application
This class represents an instance of an RWT web application at runtime.
An Application
shares the same scope and life cycle as the
ServletContext
.
In order to serve requests for an RWT application, an Application
must be created and started for the ServletContext
which receives
the requests.
To create an Application
, the ServletContext
it should be bound
to must be given along with an ApplicationConfigurator
with which clients can
configure the application before it is started.
Usually, the Application
is constructed and started in the
contextInitialized()
method of a ServletContextListener
and stopped
in its contextDestroyed()
method.
Alternatively this task can be delegated to the RWTServletContextListener
.
If this class is specified as a listener in the deployment descriptor (web.xml), it starts
an Application when the servlet context is initialized and stops it when the servlet
context is destroyed.
The RWTServletContextListener
looks for an org.eclipse.rwt.Configurator
init-parameter.
Its value is assumed to be a class that implements ApplicationConfigurator
and is used to configure the application.
Note: This API is provisional. It is likely to change before the final release.
ApplicationConfigurator
,
RWTServletContextListener
,
javax.servlet.ServletContext
,
javax.servlet.ServletContextListener
Field Summary | |
---|---|
static java.lang.String |
RESOURCES
|
Constructor Summary | |
---|---|
Application(ApplicationConfigurator configurator,
ServletContext servletContext)
Constructs a new instance of this class given a configurator and the servlet context it is bound to. |
Method Summary | |
---|---|
java.lang.String[] |
getServletNames()
Returns an array of all sevlet names that are provided by this application. |
void |
start()
Starts this application. |
void |
stop()
Stops this application if it is running. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String RESOURCES
Constructor Detail |
---|
public Application(ApplicationConfigurator configurator, ServletContext servletContext)
configurator
- the the configurator to configure the application. Must not be
null
.servletContext
- the servlet context this application is bound to. Must not be
null
.Method Detail |
---|
public void start()
java.lang.IllegalStateException
- if this apllication was already started.public void stop()
stop()
on a non-running
application does nothing.
public java.lang.String[] getServletNames()
Note: This is not the actual structure used by the receiver to maintain its list of servlet names, so modifying the array will not affect the receiver.
|
Eclipse Rich Ajax Platform | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Copyright (c) EclipseSource and others 2002, 2011. All rights reserved.