public class AnnotationConfiguration
extends org.eclipse.jetty.webapp.AbstractConfiguration
| Modifier and Type | Class | Description |
|---|---|---|
static class |
AnnotationConfiguration.ClassInheritanceMap |
|
class |
AnnotationConfiguration.ParserTask |
ParserTask
Task to executing scanning of a resource for annotations.
|
class |
AnnotationConfiguration.ServletContainerInitializerComparator |
ServletContainerInitializerComparator
Comparator impl that orders a set of ServletContainerInitializers according to the
list of classnames (optionally containing a "*" wildcard character) established in a
ServletContainerInitializerOrdering.
|
class |
AnnotationConfiguration.ServletContainerInitializerOrdering |
ServletContainerInitializerOrdering
A list of classnames of ServletContainerInitializers in the order in which
they are to be called back.
|
class |
AnnotationConfiguration.TimeStatistic |
TimeStatistic
Simple class to capture elapsed time of an operation.
|
| Modifier and Type | Field | Description |
|---|---|---|
protected ClassInheritanceHandler |
_classInheritanceHandler |
|
protected java.util.List<ContainerInitializerAnnotationHandler> |
_containerInitializerAnnotationHandlers |
|
protected org.eclipse.jetty.util.statistic.CounterStatistic |
_containerPathStats |
|
protected java.util.List<AbstractDiscoverableAnnotationHandler> |
_discoverableAnnotationHandlers |
|
protected java.util.ServiceLoader<ServletContainerInitializer> |
_loadedInitializers |
|
protected java.util.List<AnnotationConfiguration.ParserTask> |
_parserTasks |
|
protected java.util.regex.Pattern |
_sciExcludePattern |
|
protected org.eclipse.jetty.util.statistic.CounterStatistic |
_webInfClassesStats |
|
protected org.eclipse.jetty.util.statistic.CounterStatistic |
_webInfLibStats |
|
static java.lang.String |
CLASS_INHERITANCE_MAP |
|
static java.lang.String |
CONTAINER_INITIALIZER_STARTER |
|
static java.lang.String |
CONTAINER_INITIALIZERS |
|
static int |
DEFAULT_MAX_SCAN_WAIT |
|
static boolean |
DEFAULT_MULTI_THREADED |
|
static java.lang.String |
MAX_SCAN_WAIT |
|
static java.lang.String |
MULTI_THREADED |
|
static java.lang.String |
SERVLET_CONTAINER_INITIALIZER_EXCLUSION_PATTERN |
|
static java.lang.String |
SERVLET_CONTAINER_INITIALIZER_ORDER |
| Constructor | Description |
|---|---|
AnnotationConfiguration() |
| Modifier and Type | Method | Description |
|---|---|---|
void |
addDiscoverableAnnotationHandler(AbstractDiscoverableAnnotationHandler handler) |
|
void |
cloneConfigure(org.eclipse.jetty.webapp.WebAppContext template,
org.eclipse.jetty.webapp.WebAppContext context) |
|
void |
configure(org.eclipse.jetty.webapp.WebAppContext context) |
|
protected AnnotationParser |
createAnnotationParser(int javaPlatform) |
|
void |
createServletContainerInitializerAnnotationHandlers(org.eclipse.jetty.webapp.WebAppContext context,
java.util.List<ServletContainerInitializer> scis) |
|
void |
deconfigure(org.eclipse.jetty.webapp.WebAppContext context) |
|
org.eclipse.jetty.webapp.FragmentDescriptor |
getFragmentFromJar(org.eclipse.jetty.util.resource.Resource jar,
java.util.List<org.eclipse.jetty.webapp.FragmentDescriptor> frags) |
Get the web-fragment.xml from a jar
|
AnnotationConfiguration.ServletContainerInitializerOrdering |
getInitializerOrdering(org.eclipse.jetty.webapp.WebAppContext context) |
Jetty-specific extension that allows an ordering to be applied across ALL ServletContainerInitializers.
|
org.eclipse.jetty.util.resource.Resource |
getJarFor(ServletContainerInitializer service) |
|
protected int |
getMaxScanWait(org.eclipse.jetty.webapp.WebAppContext context) |
Work out how long we should wait for the async scanning to occur.
|
java.util.List<ServletContainerInitializer> |
getNonExcludedInitializers(org.eclipse.jetty.webapp.WebAppContext context) |
Get SCIs that are not excluded from consideration
|
boolean |
isFromContainerClassPath(org.eclipse.jetty.webapp.WebAppContext context,
ServletContainerInitializer sci) |
Test if the ServletContainerInitializer is from the container classpath
|
boolean |
isFromExcludedJar(org.eclipse.jetty.webapp.WebAppContext context,
ServletContainerInitializer sci,
org.eclipse.jetty.util.resource.Resource sciResource) |
Check to see if the ServletContainerIntializer loaded via the ServiceLoader came
from a jar that is excluded by the fragment ordering.
|
boolean |
isMetaDataComplete(org.eclipse.jetty.webapp.WebDescriptor d) |
|
protected boolean |
isUseMultiThreading(org.eclipse.jetty.webapp.WebAppContext context) |
Check if we should use multiple threads to scan for annotations or not
|
boolean |
matchesExclusionPattern(ServletContainerInitializer sci) |
Test if the ServletContainerIntializer is excluded by the
o.e.j.containerInitializerExclusionPattern
|
void |
parseContainerPath(org.eclipse.jetty.webapp.WebAppContext context,
AnnotationParser parser) |
Scan jars on container path.
|
void |
parseWebInfClasses(org.eclipse.jetty.webapp.WebAppContext context,
AnnotationParser parser) |
Scan classes in WEB-INF/classes
|
void |
parseWebInfLib(org.eclipse.jetty.webapp.WebAppContext context,
AnnotationParser parser) |
Scan jars in WEB-INF/lib
|
void |
postConfigure(org.eclipse.jetty.webapp.WebAppContext context) |
|
void |
preConfigure(org.eclipse.jetty.webapp.WebAppContext context) |
|
protected void |
scanForAnnotations(org.eclipse.jetty.webapp.WebAppContext context) |
Perform scanning of classes for annotations
|
public static final java.lang.String SERVLET_CONTAINER_INITIALIZER_EXCLUSION_PATTERN
public static final java.lang.String SERVLET_CONTAINER_INITIALIZER_ORDER
public static final java.lang.String CLASS_INHERITANCE_MAP
public static final java.lang.String CONTAINER_INITIALIZERS
public static final java.lang.String CONTAINER_INITIALIZER_STARTER
public static final java.lang.String MULTI_THREADED
public static final java.lang.String MAX_SCAN_WAIT
public static final int DEFAULT_MAX_SCAN_WAIT
public static final boolean DEFAULT_MULTI_THREADED
protected java.util.List<AbstractDiscoverableAnnotationHandler> _discoverableAnnotationHandlers
protected ClassInheritanceHandler _classInheritanceHandler
protected java.util.List<ContainerInitializerAnnotationHandler> _containerInitializerAnnotationHandlers
protected java.util.List<AnnotationConfiguration.ParserTask> _parserTasks
protected org.eclipse.jetty.util.statistic.CounterStatistic _containerPathStats
protected org.eclipse.jetty.util.statistic.CounterStatistic _webInfLibStats
protected org.eclipse.jetty.util.statistic.CounterStatistic _webInfClassesStats
protected java.util.regex.Pattern _sciExcludePattern
protected java.util.ServiceLoader<ServletContainerInitializer> _loadedInitializers
public void preConfigure(org.eclipse.jetty.webapp.WebAppContext context)
throws java.lang.Exception
preConfigure in class org.eclipse.jetty.webapp.AbstractConfigurationjava.lang.Exceptionpublic void addDiscoverableAnnotationHandler(AbstractDiscoverableAnnotationHandler handler)
public void deconfigure(org.eclipse.jetty.webapp.WebAppContext context)
throws java.lang.Exception
deconfigure in class org.eclipse.jetty.webapp.AbstractConfigurationjava.lang.Exceptionpublic void configure(org.eclipse.jetty.webapp.WebAppContext context)
throws java.lang.Exception
configure in class org.eclipse.jetty.webapp.AbstractConfigurationjava.lang.ExceptionAbstractConfiguration.configure(org.eclipse.jetty.webapp.WebAppContext)public void postConfigure(org.eclipse.jetty.webapp.WebAppContext context)
throws java.lang.Exception
postConfigure in class org.eclipse.jetty.webapp.AbstractConfigurationjava.lang.ExceptionAbstractConfiguration.postConfigure(org.eclipse.jetty.webapp.WebAppContext)protected void scanForAnnotations(org.eclipse.jetty.webapp.WebAppContext context)
throws java.lang.Exception
context - the context for the scanjava.lang.Exception - if unable to scanprotected AnnotationParser createAnnotationParser(int javaPlatform)
javaPlatform - The java platform to scan for.protected boolean isUseMultiThreading(org.eclipse.jetty.webapp.WebAppContext context)
context - the context of the multi threaded settingMULTI_THREADEDprotected int getMaxScanWait(org.eclipse.jetty.webapp.WebAppContext context)
context - the context of the max scan wait settingMAX_SCAN_WAITpublic void cloneConfigure(org.eclipse.jetty.webapp.WebAppContext template,
org.eclipse.jetty.webapp.WebAppContext context)
throws java.lang.Exception
cloneConfigure in class org.eclipse.jetty.webapp.AbstractConfigurationjava.lang.ExceptionAbstractConfiguration.cloneConfigure(org.eclipse.jetty.webapp.WebAppContext, org.eclipse.jetty.webapp.WebAppContext)public void createServletContainerInitializerAnnotationHandlers(org.eclipse.jetty.webapp.WebAppContext context,
java.util.List<ServletContainerInitializer> scis)
throws java.lang.Exception
java.lang.Exceptionpublic org.eclipse.jetty.util.resource.Resource getJarFor(ServletContainerInitializer service) throws java.net.MalformedURLException, java.io.IOException
java.net.MalformedURLExceptionjava.io.IOExceptionpublic boolean isFromExcludedJar(org.eclipse.jetty.webapp.WebAppContext context,
ServletContainerInitializer sci,
org.eclipse.jetty.util.resource.Resource sciResource)
throws java.lang.Exception
context - the context for the jarssci - the servlet container initializersciResource - the resource for the servlet container initializerjava.lang.Exception - if unable to determine exclusionpublic boolean matchesExclusionPattern(ServletContainerInitializer sci)
sci - the ServletContainerIntializerpublic boolean isFromContainerClassPath(org.eclipse.jetty.webapp.WebAppContext context,
ServletContainerInitializer sci)
context - the context for the webapp classpathsci - the ServletContainerIntializerpublic java.util.List<ServletContainerInitializer> getNonExcludedInitializers(org.eclipse.jetty.webapp.WebAppContext context) throws java.lang.Exception
context - the web app contextjava.lang.Exception - if unable to get listpublic AnnotationConfiguration.ServletContainerInitializerOrdering getInitializerOrdering(org.eclipse.jetty.webapp.WebAppContext context)
context - the context for the initializer ordering configurationpublic void parseContainerPath(org.eclipse.jetty.webapp.WebAppContext context,
AnnotationParser parser)
throws java.lang.Exception
context - the context for the scanparser - the parser to scan withjava.lang.Exception - if unable to scanpublic void parseWebInfLib(org.eclipse.jetty.webapp.WebAppContext context,
AnnotationParser parser)
throws java.lang.Exception
context - the context for the scanparser - the annotation parser to usejava.lang.Exception - if unable to scan and/or parsepublic void parseWebInfClasses(org.eclipse.jetty.webapp.WebAppContext context,
AnnotationParser parser)
throws java.lang.Exception
context - the context for the scanparser - the annotation parser to usejava.lang.Exception - if unable to scan and/or parsepublic org.eclipse.jetty.webapp.FragmentDescriptor getFragmentFromJar(org.eclipse.jetty.util.resource.Resource jar,
java.util.List<org.eclipse.jetty.webapp.FragmentDescriptor> frags)
throws java.lang.Exception
jar - the jar to look in for a fragmentfrags - the fragments previously foundjava.lang.Exception - if unable to determine the the fragment containspublic boolean isMetaDataComplete(org.eclipse.jetty.webapp.WebDescriptor d)
Copyright © 1995–2018 Webtide. All rights reserved.