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, OSGiAppProvider, WebAppProvider
public abstract class ScanningAppProvider
- extends AbstractLifeCycle
- implements AppProvider
Methods inherited from class org.eclipse.jetty.util.component.AbstractLifeCycle |
addLifeCycleListener, getState, getState, isFailed, isRunning, isStarted, isStarting, isStopped, isStopping, removeLifeCycleListener, start, stop, toString |
_filenameFilter
protected final FilenameFilter _filenameFilter
ScanningAppProvider
protected ScanningAppProvider(FilenameFilter filter)
getDeployedApps
protected Map<String,App> getDeployedApps()
- Returns:
- The index of currently deployed applications.
createApp
protected App createApp(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 Exception
- Overrides:
doStart
in class AbstractLifeCycle
- Throws:
Exception
doStop
protected void doStop()
throws Exception
- Overrides:
doStop
in class AbstractLifeCycle
- Throws:
Exception
fileAdded
protected void fileAdded(String filename)
throws Exception
- Throws:
Exception
fileChanged
protected void fileChanged(String filename)
throws Exception
- Throws:
Exception
fileRemoved
protected void fileRemoved(String filename)
throws Exception
- Throws:
Exception
getDeploymentManager
public DeploymentManager getDeploymentManager()
- Get the deploymentManager.
- Returns:
- the deploymentManager
getMonitoredDirResource
public Resource getMonitoredDirResource()
getMonitoredDirName
public 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(String dir)
- Deprecated. Use
setMonitoredDirName(String)
setMonitoredDirName
public void setMonitoredDirName(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 © 1995-2011 Mort Bay Consulting. All Rights Reserved.