org.eclipse.jetty.deploy.providers

## Class ScanningAppProvider

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

- All Implemented Interfaces:
    AppProvider, LifeCycle
  Direct Known Subclasses:
    ContextProvider, WebAppProvider

      public abstract class ScanningAppProvider
      extends AbstractLifeCycle
      implements AppProvider

- - ### Nested Class Summary

    - ### 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
    Modifier and Type | Field and Description
    --- | ---
    `protected java.io.FilenameFilter` | `_filenameFilter`

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

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

  - ### Constructor Summary

    Constructors
    Modifier | Constructor and Description
    --- | ---
    `protected` | `ScanningAppProvider(java.io.FilenameFilter filter)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `addScannerListener(Scanner.Listener listener)`
    `protected App` | `createApp(java.lang.String filename)` Called by the Scanner.DiscreteListener to create a new App object.
    `protected void` | `doStart()`
    `protected void` | `doStop()`
    `protected void` | `fileAdded(java.lang.String filename)`
    `protected void` | `fileChanged(java.lang.String filename)`
    `protected void` | `fileRemoved(java.lang.String filename)`
    `protected java.util.Map<java.lang.String,App>` | `getDeployedApps()`
    `DeploymentManager` | `getDeploymentManager()` Get the deploymentManager.
    `java.lang.String` | `getMonitoredDirName()`
    `Resource` | `getMonitoredDirResource()`
    `int` | `getScanInterval()`
    `boolean` | `isRecursive()`
    `void` | `setDeploymentManager(DeploymentManager deploymentManager)` Set the Deployment Manager
    `void` | `setMonitoredDir(java.lang.String dir)` Deprecated. Use `setMonitoredDirName(String)`
    `void` | `setMonitoredDirName(java.lang.String dir)`
    `void` | `setMonitoredDirResource(Resource contextsDir)`
    `protected void` | `setRecursive(boolean recursive)`
    `void` | `setScanInterval(int scanInterval)`

    - ### 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.deploy.AppProvider

      `createContextHandler`

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

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

- - ### Field Detail

    - #### _filenameFilter

          protected final java.io.FilenameFilter _filenameFilter

  - ### Constructor Detail

    - #### ScanningAppProvider

          protected ScanningAppProvider(java.io.FilenameFilter filter)

  - ### Method Detail

    - #### getDeployedApps

          protected java.util.Map<java.lang.String,App> getDeployedApps()

      Returns:
        The index of currently deployed applications.

    - #### createApp

          protected App createApp(java.lang.String filename)

      Called by the Scanner.DiscreteListener to create a new App object. Isolated in a method so that it is possible to override the default App object for specialized implementations of the AppProvider.
      Parameters:
        `filename` - The file that is the context.xml. It is resolved by `Resource.newResource(String)`
      Returns:
        The App object for this particular context definition file.

    - #### doStart

          protected void doStart()
                          throws java.lang.Exception

      Overrides:
        `doStart` in class `AbstractLifeCycle`
      Throws:
        `java.lang.Exception`

    - #### doStop

          protected void doStop()
                         throws java.lang.Exception

      Overrides:
        `doStop` in class `AbstractLifeCycle`
      Throws:
        `java.lang.Exception`

    - #### fileAdded

          protected void fileAdded(java.lang.String filename)
                            throws java.lang.Exception

      Throws:
        `java.lang.Exception`

    - #### fileChanged

          protected void fileChanged(java.lang.String filename)
                              throws java.lang.Exception

      Throws:
        `java.lang.Exception`

    - #### fileRemoved

          protected void fileRemoved(java.lang.String filename)
                              throws java.lang.Exception

      Throws:
        `java.lang.Exception`

    - #### getDeploymentManager

          public DeploymentManager getDeploymentManager()

      Get the deploymentManager.
      Returns:
        the deploymentManager

    - #### getMonitoredDirResource

          public Resource getMonitoredDirResource()

    - #### getMonitoredDirName

          public java.lang.String getMonitoredDirName()

    - #### getScanInterval

          public int getScanInterval()

    - #### isRecursive

          public boolean isRecursive()

    - #### setDeploymentManager

          public void setDeploymentManager(DeploymentManager deploymentManager)

      Description copied from interface: `AppProvider`
      Set the Deployment Manager
      Specified by:
        `setDeploymentManager` in interface `AppProvider`

    - #### setMonitoredDirResource

          public void setMonitoredDirResource(Resource contextsDir)

    - #### addScannerListener

          public void addScannerListener(Scanner.Listener listener)

    - #### setMonitoredDir

          public void setMonitoredDir(java.lang.String dir)

      Deprecated. Use `setMonitoredDirName(String)`

    - #### setMonitoredDirName

          public void setMonitoredDirName(java.lang.String dir)

      Parameters:
        `dir` - Directory to scan for context descriptors or war files

    - #### setRecursive

          protected void setRecursive(boolean recursive)

    - #### setScanInterval

          public void setScanInterval(int scanInterval)

Copyright © 2013 FuseSource, Corp.. All Rights Reserved.