@ManagedObject(value="Provider for start-up deployement of webapps based on presence in directory") public class WebAppProvider extends ScanningAppProvider
This provider scans one or more directories (typically "webapps") for contexts to deploy, which may be:
XmlConfiguration format that configures a ContextHandler instanceTo avoid double deployments and allow flexibility of the content of the scanned directories, the provider implements some heuristics to ignore some files found in the scans:
For XML configured contexts, the ID map will contain a reference to the Server instance called "Server" and
properties for the webapp file as "jetty.webapp" and directory as "jetty.webapps".
| Modifier and Type | Class and Description |
|---|---|
class |
WebAppProvider.Filter |
AbstractLifeCycle.AbstractLifeCycleListenerLifeCycle.Listener_filenameFilter| Constructor and Description |
|---|
WebAppProvider() |
| Modifier and Type | Method and Description |
|---|---|
ContextHandler |
createContextHandler(App app)
Create a ContextHandler for an App
|
protected void |
fileAdded(String filename) |
protected void |
fileChanged(String filename) |
protected void |
fileRemoved(String filename) |
String[] |
getConfigurationClasses() |
ConfigurationManager |
getConfigurationManager() |
String |
getDefaultsDescriptor()
Get the defaultsDescriptor.
|
File |
getTempDir()
Get the user supplied Work Directory.
|
protected void |
initializeWebAppContextDefaults(WebAppContext webapp) |
boolean |
isExtractWars()
Get the extractWars.
|
boolean |
isParentLoaderPriority()
Get the parentLoaderPriority.
|
void |
setConfigurationClasses(String[] configurations) |
void |
setConfigurationManager(ConfigurationManager configurationManager)
Set the configurationManager.
|
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.
|
addScannerListener, createApp, doStart, doStop, exists, getDeployedApps, getDeploymentManager, getMonitoredDirName, getMonitoredDirResource, getMonitoredResources, getScanInterval, isRecursive, setDeploymentManager, setFilenameFilter, setMonitoredDirectories, setMonitoredDirName, setMonitoredDirResource, setMonitoredResources, setRecursive, setScanIntervaladdLifeCycleListener, getState, getState, getStopTimeout, isFailed, isRunning, isStarted, isStarting, isStopped, isStopping, removeLifeCycleListener, setStopTimeout, start, stopclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitaddLifeCycleListener, isFailed, isRunning, isStarted, isStarting, isStopped, isStopping, removeLifeCycleListener, start, stop@ManagedAttribute(value="extract war files") public boolean isExtractWars()
public void setExtractWars(boolean extractWars)
extractWars - the extractWars to set@ManagedAttribute(value="parent classloader has priority") public boolean isParentLoaderPriority()
public void setParentLoaderPriority(boolean parentLoaderPriority)
parentLoaderPriority - the parentLoaderPriority to set@ManagedAttribute(value="default descriptor for webapps") public String getDefaultsDescriptor()
public void setDefaultsDescriptor(String defaultsDescriptor)
defaultsDescriptor - the defaultsDescriptor to setpublic ConfigurationManager getConfigurationManager()
public void setConfigurationManager(ConfigurationManager configurationManager)
configurationManager - the configurationManager to setpublic void setConfigurationClasses(String[] configurations)
configurations - The configuration class names.@ManagedAttribute(value="configuration classes for webapps to be processed through") public String[] getConfigurationClasses()
public void setTempDir(File directory)
Default is the same as the java.io.tmpdir System Property.
directory - the new work directory@ManagedAttribute(value="temp directory for use, null if no user set temp directory") public File getTempDir()
protected void initializeWebAppContextDefaults(WebAppContext webapp)
public ContextHandler createContextHandler(App app) throws Exception
AppProviderapp - The AppIOException - if unable to create contextException - if unable to create contextprotected void fileChanged(String filename) throws Exception
fileChanged in class ScanningAppProviderExceptionprotected void fileAdded(String filename) throws Exception
fileAdded in class ScanningAppProviderExceptionprotected void fileRemoved(String filename) throws Exception
fileRemoved in class ScanningAppProviderExceptionCopyright © 1995-2016 Webtide. All Rights Reserved.