@ManagedObject(value="Provider for start-up deployement of webapps based on presence in directory") public class WebAppProvider extends ScanningAppProvider
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.
Modifier and Type | Class and Description |
---|---|
static class |
WebAppProvider.Filter |
AbstractLifeCycle.AbstractLifeCycleListener
LifeCycle.Listener
_filenameFilter
Constructor and Description |
---|
WebAppProvider() |
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.
|
addScannerListener, createApp, doStart, doStop, fileAdded, fileChanged, fileRemoved, getDeployedApps, getDeploymentManager, getMonitoredDirName, getMonitoredDirResource, getScanInterval, isRecursive, setDeploymentManager, setMonitoredDir, setMonitoredDirName, setMonitoredDirResource, setRecursive, setScanInterval
addLifeCycleListener, getState, getState, getStopTimeout, isFailed, isRunning, isStarted, isStarting, isStopped, isStopping, removeLifeCycleListener, setStopTimeout, start, stop
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
addLifeCycleListener, 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 set@ManagedAttribute(value="directory to scan for context.xml files") public String getContextXmlDir()
public void setContextXmlDir(String contextsDir)
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.
contextsDir
- ContextProvider
public 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()
public ContextHandler createContextHandler(App app) throws Exception
AppProvider
app
- The AppIOException
Exception
Copyright © 1995-2012 Mort Bay Consulting. All Rights Reserved.