- java.lang.Object
-
- org.eclipse.jetty.webapp.AbstractConfiguration
-
- All Implemented Interfaces:
Configuration
- Direct Known Subclasses:
FragmentConfiguration,JaasConfiguration,JettyWebXmlConfiguration,JmxConfiguration,JndiConfiguration,JspConfiguration,MetaInfConfiguration,ServletsConfiguration,WebAppConfiguration,WebInfConfiguration,WebXmlConfiguration
public class AbstractConfiguration extends java.lang.Object implements Configuration
-
-
Field Summary
-
Fields inherited from interface org.eclipse.jetty.webapp.Configuration
ATTR
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedAbstractConfiguration()protectedAbstractConfiguration(boolean enabledByDefault)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanabort(WebAppContext context)protected voidaddDependencies(java.lang.Class<? extends Configuration>... classes)Add configuration classes that come before this configurationprotected voidaddDependencies(java.lang.String... classes)Add configuration classes that come before this configurationprotected voidaddDependents(java.lang.Class<?>... classes)Add configuration classes that come after this configurationprotected voidaddDependents(java.lang.String... classes)Add configuration classes that come after this configurationvoidcloneConfigure(WebAppContext template, WebAppContext context)voidconfigure(WebAppContext context)Configure WebApp.voiddeconfigure(WebAppContext context)DeConfigure WebApp.voiddestroy(WebAppContext context)Destroy WebApp.protected voidexpose(java.lang.String... classes)Expose classes to the web application by adding them as exclusions to thegetServerClasses()java.util.Collection<java.lang.String>getDependencies()Get known Configuration Dependencies.java.util.Collection<java.lang.String>getDependents()Get known Configuration Dependents.ClassMatchergetServerClasses()Get the system classes associated with this Configuration.ClassMatchergetSystemClasses()Get the system classes associated with this Configuration.protected voidhide(java.lang.String... classes)Hide classes from the web application by adding them to thegetServerClasses()booleanisEnabledByDefault()voidpostConfigure(WebAppContext context)Clear down after configuration.voidpreConfigure(WebAppContext context)Set up for configuration.protected voidprotect(java.lang.String... classes)Protect classes from modification by the web application by adding them to thegetSystemClasses()protected voidprotectAndExpose(java.lang.String... classes)Protect classes from modification by the web application by adding them to thegetSystemClasses()and expose them to the web application by adding them as exclusions to thegetServerClasses()-
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.webapp.Configuration
isAvailable, replaces
-
-
-
-
Method Detail
-
addDependencies
protected void addDependencies(java.lang.String... classes)
Add configuration classes that come before this configuration- Parameters:
classes- Classname or package name
-
addDependencies
protected void addDependencies(java.lang.Class<? extends Configuration>... classes)
Add configuration classes that come before this configuration- Parameters:
classes- Classes
-
addDependents
protected void addDependents(java.lang.String... classes)
Add configuration classes that come after this configuration- Parameters:
classes- Classname or package name
-
addDependents
protected void addDependents(java.lang.Class<?>... classes)
Add configuration classes that come after this configuration- Parameters:
classes- Class
-
protect
protected void protect(java.lang.String... classes)
Protect classes from modification by the web application by adding them to thegetSystemClasses()- Parameters:
classes- classname or package pattern
-
hide
protected void hide(java.lang.String... classes)
Hide classes from the web application by adding them to thegetServerClasses()- Parameters:
classes- classname or package pattern
-
expose
protected void expose(java.lang.String... classes)
Expose classes to the web application by adding them as exclusions to thegetServerClasses()- Parameters:
classes- classname or package pattern
-
protectAndExpose
protected void protectAndExpose(java.lang.String... classes)
Protect classes from modification by the web application by adding them to thegetSystemClasses()and expose them to the web application by adding them as exclusions to thegetServerClasses()- Parameters:
classes- classname or package pattern
-
getDependents
public java.util.Collection<java.lang.String> getDependents()
Description copied from interface:ConfigurationGet known Configuration Dependents.- Specified by:
getDependentsin interfaceConfiguration- Returns:
- The names of Configurations that
TopologicalSortmust order after this configuration.
-
getDependencies
public java.util.Collection<java.lang.String> getDependencies()
Description copied from interface:ConfigurationGet known Configuration Dependencies.- Specified by:
getDependenciesin interfaceConfiguration- Returns:
- The names of Configurations that
TopologicalSortmust order before this configuration.
-
getSystemClasses
public ClassMatcher getSystemClasses()
Description copied from interface:ConfigurationGet the system classes associated with this Configuration.- Specified by:
getSystemClassesin interfaceConfiguration- Returns:
- ClassMatcher of system classes.
-
getServerClasses
public ClassMatcher getServerClasses()
Description copied from interface:ConfigurationGet the system classes associated with this Configuration.- Specified by:
getServerClassesin interfaceConfiguration- Returns:
- ClassMatcher of server classes.
-
preConfigure
public void preConfigure(WebAppContext context) throws java.lang.Exception
Description copied from interface:ConfigurationSet up for configuration.Typically this step discovers configuration resources. Calls to preConfigure may alter the Configurations configured on the WebAppContext, so long as configurations prior to this configuration are not altered.
- Specified by:
preConfigurein interfaceConfiguration- Parameters:
context- The context to configure- Throws:
java.lang.Exception- if unable to pre configure
-
configure
public void configure(WebAppContext context) throws java.lang.Exception
Description copied from interface:ConfigurationConfigure WebApp.Typically this step applies the discovered configuration resources to either the
WebAppContextor the associatedMetaData.- Specified by:
configurein interfaceConfiguration- Parameters:
context- The context to configure- Throws:
java.lang.Exception- if unable to configure
-
postConfigure
public void postConfigure(WebAppContext context) throws java.lang.Exception
Description copied from interface:ConfigurationClear down after configuration.- Specified by:
postConfigurein interfaceConfiguration- Parameters:
context- The context to configure- Throws:
java.lang.Exception- if unable to post configure
-
deconfigure
public void deconfigure(WebAppContext context) throws java.lang.Exception
Description copied from interface:ConfigurationDeConfigure WebApp. This method is called to undo all configuration done. This is called to allow the context to work correctly over a stop/start cycle- Specified by:
deconfigurein interfaceConfiguration- Parameters:
context- The context to configure- Throws:
java.lang.Exception- if unable to deconfigure
-
destroy
public void destroy(WebAppContext context) throws java.lang.Exception
Description copied from interface:ConfigurationDestroy WebApp. This method is called to destroy a webappcontext. It is typically called when a context is removed from a server handler hierarchy by the deployer.- Specified by:
destroyin interfaceConfiguration- Parameters:
context- The context to configure- Throws:
java.lang.Exception- if unable to destroy
-
isEnabledByDefault
public boolean isEnabledByDefault()
- Specified by:
isEnabledByDefaultin interfaceConfiguration- Returns:
- true if configuration is enabled by default
-
abort
public boolean abort(WebAppContext context)
- Specified by:
abortin interfaceConfiguration- Returns:
- true if configuration should be aborted
-
cloneConfigure
public void cloneConfigure(WebAppContext template, WebAppContext context) throws java.lang.Exception
- Throws:
java.lang.Exception
-
-