WebAppProvider (Jetty :: Aggregate :: All core Jetty 7.6.8.v20121106 API)
Date: 2012-11-06

org.eclipse.jetty.deploy.providers

## Class WebAppProvider

- java.lang.Object
- - org.eclipse.jetty.util.component.AbstractLifeCycle
  - - org.eclipse.jetty.deploy.providers.ScanningAppProvider
    - - org.eclipse.jetty.deploy.providers.WebAppProvider

- All Implemented Interfaces:
    AppProvider, LifeCycle

      public class WebAppProvider
      extends ScanningAppProvider

  Context directory App Provider.

  This specialization of `ScanningAppProvider` is the replacement for old (and deprecated) `org.eclipse.jetty.deploy.WebAppDeployer` and it will scan a directory only for war files or directories files.

  Webapps with names root or starting with root- are deployed at /. If the name is in the format root-hostname, then the webapp is deployed at / in the virtual host hostname.

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `static class` | `WebAppProvider.Filter`

    - ### Nested classes/interfaces inherited from class org.eclipse.jetty.util.component.AbstractLifeCycle

      `AbstractLifeCycle.AbstractLifeCycleListener`

    - ### Nested classes/interfaces inherited from interface org.eclipse.jetty.util.component.LifeCycle

      `LifeCycle.Listener`

  - ### Field Summary

    - ### Fields inherited from class org.eclipse.jetty.deploy.providers.ScanningAppProvider

      `_filenameFilter`

    - ### Fields inherited from class org.eclipse.jetty.util.component.AbstractLifeCycle

      `_listeners, FAILED, RUNNING, STARTED, STARTING, STOPPED, STOPPING`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `WebAppProvider()`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `ContextHandler` | `createContextHandler(App app)` Create a ContextHandler for an App
    `String[]` | `getConfigurationClasses()`
    `String` | `getContextXmlDir()`
    `String` | `getDefaultsDescriptor()` Get the defaultsDescriptor.
    `File` | `getTempDir()` Get the user supplied Work Directory.
    `boolean` | `isExtractWars()` Get the extractWars.
    `boolean` | `isParentLoaderPriority()` Get the parentLoaderPriority.
    `void` | `setConfigurationClasses(String[] configurations)`
    `void` | `setContextXmlDir(String contextsDir)` Set the directory in which to look for context XML files.
    `void` | `setDefaultsDescriptor(String defaultsDescriptor)` Set the defaultsDescriptor.
    `void` | `setExtractWars(boolean extractWars)` Set the extractWars.
    `void` | `setParentLoaderPriority(boolean parentLoaderPriority)` Set the parentLoaderPriority.
    `void` | `setTempDir(File directory)` Set the Work directory where unpacked WAR files are managed from.

    - ### Methods inherited from class org.eclipse.jetty.deploy.providers.ScanningAppProvider

      `addScannerListener, createApp, doStart, doStop, fileAdded, fileChanged, fileRemoved, getDeployedApps, getDeploymentManager, getMonitoredDirName, getMonitoredDirResource, getScanInterval, isRecursive, setDeploymentManager, setMonitoredDir, setMonitoredDirName, setMonitoredDirResource, setRecursive, setScanInterval`

    - ### Methods inherited from class org.eclipse.jetty.util.component.AbstractLifeCycle

      `addLifeCycleListener, getState, getState, isFailed, isRunning, isStarted, isStarting, isStopped, isStopping, removeLifeCycleListener, start, stop`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

    - ### Methods inherited from interface org.eclipse.jetty.util.component.LifeCycle

      `addLifeCycleListener, isFailed, isRunning, isStarted, isStarting, isStopped, isStopping, removeLifeCycleListener, start, stop`

- - ### Constructor Detail

    - #### WebAppProvider

          public WebAppProvider()

  - ### Method Detail

    - #### isExtractWars

          public boolean isExtractWars()

      Get the extractWars.
      Returns:
        the extractWars

    - #### setExtractWars

          public void setExtractWars(boolean extractWars)

      Set the extractWars.
      Parameters:
        `extractWars` - the extractWars to set

    - #### isParentLoaderPriority

          public boolean isParentLoaderPriority()

      Get the parentLoaderPriority.
      Returns:
        the parentLoaderPriority

    - #### setParentLoaderPriority

          public void setParentLoaderPriority(boolean parentLoaderPriority)

      Set the parentLoaderPriority.
      Parameters:
        `parentLoaderPriority` - the parentLoaderPriority to set

    - #### getDefaultsDescriptor

          public String getDefaultsDescriptor()

      Get the defaultsDescriptor.
      Returns:
        the defaultsDescriptor

    - #### setDefaultsDescriptor

          public void setDefaultsDescriptor(String defaultsDescriptor)

      Set the defaultsDescriptor.
      Parameters:
        `defaultsDescriptor` - the defaultsDescriptor to set

    - #### getContextXmlDir

          public String getContextXmlDir()

    - #### setContextXmlDir

          public void setContextXmlDir(String contextsDir)

      Set the directory in which to look for context XML files.

      If a webapp call "foo/" or "foo.war" is discovered in the monitored directory, then the ContextXmlDir is examined to see if a foo.xml file exists. If it does, then this deployer will not deploy the webapp and the ContextProvider should be used to act on the foo.xml file.

      Parameters:
        `contextsDir` -
      See Also:
        `ContextProvider`

    - #### setConfigurationClasses

          public void setConfigurationClasses(String[] configurations)

      Parameters:
        `configurations` - The configuration class names.

    - #### getConfigurationClasses

          public String[] getConfigurationClasses()

    - #### setTempDir

          public void setTempDir(File directory)

      Set the Work directory where unpacked WAR files are managed from.

      Default is the same as the `java.io.tmpdir` System Property.

      Parameters:
        `directory` - the new work directory

    - #### getTempDir

          public File getTempDir()

      Get the user supplied Work Directory.
      Returns:
        the user supplied work directory (null if user has not set Temp Directory yet)

    - #### createContextHandler

          public ContextHandler createContextHandler(App app)
                                              throws Exception

      Description copied from interface: `AppProvider`
      Create a ContextHandler for an App
      Parameters:
        `app` - The App
      Returns:
        A ContextHandler
      Throws:
        `IOException`
        `Exception`

Copyright © 1995-2012 Mort Bay Consulting. All Rights Reserved.