Eclipse Remote Application Platform

## org.eclipse.rap.rwt.application
Interface ApplicationConfiguration

    public interface ApplicationConfiguration

An `ApplicationConfiguration` describes an RWT application, including the entrypoints, URL mappings, themes, etc. that constitute the application.

The `configure` method will be called by the framework in order to configure an application instance before it is started. An implementation must at least register an entrypoint that provides the user interface for the application. A simple implementation of this interface looks like this:

     public class ExampleConfiguration implements ApplicationConfiguration {

       public void configure( Application application ) {
         configuration.addEntryPoint( "/example", ExampleEntryPoint.class, null );
       }
     }

The `configure` method is called only once during the lifetime of an application. The configuration of the application takes place before the system is activated. Therefore, manipulation of the configuration instance at a later point in time is unsupported.

There can be more than one application instance at runtime, running on different network ports or in different contexts. In most cases, developers do not have to create an application instance explicitly. The `ApplicationConfiguration` can be registered with the the surrounding container instead. For example, in a servlet container, the application can be registered as `context-param` in the `web.xml` (see `CONFIGURATION_PARAM`), in `OSGi` it can be registered as a service, and when using the workbench with RAP, the application is registered with an extension-point.

Apart from this, an ``ApplicationRunner`` can be used to run an application with this configuration.

Since:
  2.0
See Also:
  `Application`, `ApplicationRunner`

Field Summary
`static java.lang.String` `CONFIGURATION_PARAM` This constant contains the context parameter name to register an ApplicationConfiguration in a servlet container environment when running RAP without OSGi.
`static java.lang.String` `RESOURCE_ROOT_LOCATION` This constant contains the context parameter name to configure the web application's context directory on disk.

Method Summary
`void` `configure(Application application)` Implementations must use this method to configure an application.

Field Detail

### CONFIGURATION_PARAM

    static final java.lang.String CONFIGURATION_PARAM

  This constant contains the context parameter name to register an ApplicationConfiguration in a servlet container environment when running RAP without OSGi. To do so, the fully qualified class name of the implementation has to be registered as a `context-param` in the `web.xml`. Example:

       <context-param>
         <param-name>org.eclipse.rap.applicationConfiguration</param-name>
         <param-value>com.example.ExampleConfiguration</param-value>
       </context-param>

  See Also:
    Constant Field Values

### RESOURCE_ROOT_LOCATION

    static final java.lang.String RESOURCE_ROOT_LOCATION

  This constant contains the context parameter name to configure the web application's context directory on disk.

  See Also:
    Constant Field Values

Method Detail

### configure

    void configure(Application application)

  Implementations must use this method to configure an application. The method is called by the framework once before the application is started.

  Parameters:
    `application` - the application to configure

Eclipse Remote Application Platform

Copyright (c) EclipseSource and others 2002, 2013. All rights reserved. This program and the accompanying materials are made available under the terms of the Eclipse Public License v1.0