AppProvider, org.eclipse.jetty.util.component.LifeCycle@ManagedObject("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 | Description |
|---|---|---|
class |
WebAppProvider.Filter |
FAILED, RUNNING, STARTED, STARTING, STOP_ON_FAILURE, STOPPED, STOPPING_filenameFilter| Constructor | Description |
|---|---|
WebAppProvider() |
| Modifier and Type | Method | Description |
|---|---|---|
org.eclipse.jetty.server.handler.ContextHandler |
createContextHandler(App app) |
Create a ContextHandler for an App
|
protected void |
fileAdded(java.lang.String filename) |
|
protected void |
fileChanged(java.lang.String filename) |
|
protected void |
fileRemoved(java.lang.String filename) |
|
java.lang.String[] |
getConfigurationClasses() |
|
ConfigurationManager |
getConfigurationManager() |
|
java.lang.String |
getDefaultsDescriptor() |
Get the defaultsDescriptor.
|
java.io.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(java.lang.String[] configurations) |
|
void |
setConfigurationManager(ConfigurationManager configurationManager) |
Set the configurationManager.
|
void |
setDefaultsDescriptor(java.lang.String defaultsDescriptor) |
Set the defaultsDescriptor.
|
void |
setExtractWars(boolean extractWars) |
Set the extractWars.
|
void |
setParentLoaderPriority(boolean parentLoaderPriority) |
Set the parentLoaderPriority.
|
void |
setTempDir(java.io.File directory) |
Set the Work directory where unpacked WAR files are managed from.
|
addLifeCycleListener, getState, getState, getStopTimeout, isFailed, isRunning, isStarted, isStarting, isStopped, isStopping, removeLifeCycleListener, setStopTimeout, start, stopaddLifeCycleListener, isFailed, isRunning, isStarted, isStarting, isStopped, isStopping, removeLifeCycleListener, start, start, stop, stopclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitaddScannerListener, createApp, doStart, doStop, exists, getDeployedApps, getDeploymentManager, getMonitoredDirName, getMonitoredDirResource, getMonitoredResources, getScanInterval, isRecursive, setDeploymentManager, setFilenameFilter, setMonitoredDirectories, setMonitoredDirName, setMonitoredDirResource, setMonitoredResources, setRecursive, setScanInterval@ManagedAttribute("extract war files")
public boolean isExtractWars()
public void setExtractWars(boolean extractWars)
extractWars - the extractWars to set@ManagedAttribute("parent classloader has priority")
public boolean isParentLoaderPriority()
public void setParentLoaderPriority(boolean parentLoaderPriority)
parentLoaderPriority - the parentLoaderPriority to set@ManagedAttribute("default descriptor for webapps")
public java.lang.String getDefaultsDescriptor()
public void setDefaultsDescriptor(java.lang.String defaultsDescriptor)
defaultsDescriptor - the defaultsDescriptor to setpublic ConfigurationManager getConfigurationManager()
public void setConfigurationManager(ConfigurationManager configurationManager)
configurationManager - the configurationManager to setpublic void setConfigurationClasses(java.lang.String[] configurations)
configurations - The configuration class names.@ManagedAttribute("configuration classes for webapps to be processed through")
public java.lang.String[] getConfigurationClasses()
public void setTempDir(java.io.File directory)
Default is the same as the java.io.tmpdir System Property.
directory - the new work directory@ManagedAttribute("temp directory for use, null if no user set temp directory")
public java.io.File getTempDir()
protected void initializeWebAppContextDefaults(WebAppContext webapp)
public org.eclipse.jetty.server.handler.ContextHandler createContextHandler(App app) throws java.lang.Exception
AppProviderapp - The Appjava.io.IOException - if unable to create contextjava.lang.Exception - if unable to create contextprotected void fileChanged(java.lang.String filename)
throws java.lang.Exception
fileChanged in class ScanningAppProviderjava.lang.Exceptionprotected void fileAdded(java.lang.String filename)
throws java.lang.Exception
fileAdded in class ScanningAppProviderjava.lang.Exceptionprotected void fileRemoved(java.lang.String filename)
throws java.lang.Exception
fileRemoved in class ScanningAppProviderjava.lang.ExceptionCopyright © 1995–2018 Webtide. All rights reserved.