public class AnnotationConfiguration extends AbstractConfiguration
| Modifier and Type | Class and Description |
|---|---|
static class |
AnnotationConfiguration.ClassInheritanceMap |
class |
AnnotationConfiguration.ContainerClassNameResolver
ContainerClassNameResolver
Checks to see if a classname belongs to a hidden or visible package
when scanning for annotations and thus whether it should be excluded from
consideration or not.
|
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.
|
class |
AnnotationConfiguration.WebAppClassNameResolver
WebAppClassNameResolver
Checks to see if a classname belongs to hidden or visible packages when scanning,
and whether a classname that is a duplicate should override a previously
scanned classname.
|
Configuration.ClassListATTR| Constructor and Description |
|---|
AnnotationConfiguration() |
| Modifier and Type | Method and Description |
|---|---|
void |
addDiscoverableAnnotationHandler(AbstractDiscoverableAnnotationHandler handler) |
void |
cloneConfigure(WebAppContext template,
WebAppContext context) |
void |
configure(WebAppContext context) |
protected AnnotationParser |
createAnnotationParser() |
void |
createServletContainerInitializerAnnotationHandlers(WebAppContext context,
List<ServletContainerInitializer> scis) |
void |
deconfigure(WebAppContext context) |
FragmentDescriptor |
getFragmentFromJar(Resource jar,
List<FragmentDescriptor> frags)
Get the web-fragment.xml from a jar
|
AnnotationConfiguration.ServletContainerInitializerOrdering |
getInitializerOrdering(WebAppContext context)
Jetty-specific extension that allows an ordering to be applied across ALL ServletContainerInitializers.
|
Resource |
getJarFor(ServletContainerInitializer service) |
protected int |
getMaxScanWait(WebAppContext context)
Work out how long we should wait for the async scanning to occur.
|
List<ServletContainerInitializer> |
getNonExcludedInitializers(WebAppContext context) |
boolean |
isFromContainerClassPath(WebAppContext context,
ServletContainerInitializer sci)
Test if the ServletContainerInitializer is from the container classpath
|
boolean |
isFromExcludedJar(WebAppContext context,
ServletContainerInitializer sci,
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(WebDescriptor d) |
protected boolean |
isUseMultiThreading(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(WebAppContext context,
AnnotationParser parser)
Scan jars on container path.
|
void |
parseWebInfClasses(WebAppContext context,
AnnotationParser parser)
Scan classes in WEB-INF/classes
|
void |
parseWebInfLib(WebAppContext context,
AnnotationParser parser)
Scan jars in WEB-INF/lib
|
void |
postConfigure(WebAppContext context) |
void |
preConfigure(WebAppContext context) |
protected void |
scanForAnnotations(WebAppContext context)
Perform scanning of classes for annotations
|
destroypublic static final String SERVLET_CONTAINER_INITIALIZER_EXCLUSION_PATTERN
public static final String SERVLET_CONTAINER_INITIALIZER_ORDER
public static final String CLASS_INHERITANCE_MAP
public static final String CONTAINER_INITIALIZERS
public static final String CONTAINER_INITIALIZER_STARTER
public static final String MULTI_THREADED
public static final String MAX_SCAN_WAIT
public static final int DEFAULT_MAX_SCAN_WAIT
public static final boolean DEFAULT_MULTI_THREADED
protected List<AbstractDiscoverableAnnotationHandler> _discoverableAnnotationHandlers
protected ClassInheritanceHandler _classInheritanceHandler
protected List<ContainerInitializerAnnotationHandler> _containerInitializerAnnotationHandlers
protected List<AnnotationConfiguration.ParserTask> _parserTasks
protected AnnotationConfiguration.WebAppClassNameResolver _webAppClassNameResolver
protected AnnotationConfiguration.ContainerClassNameResolver _containerClassNameResolver
protected CounterStatistic _containerPathStats
protected CounterStatistic _webInfLibStats
protected CounterStatistic _webInfClassesStats
protected Pattern _sciExcludePattern
public void preConfigure(WebAppContext context) throws Exception
preConfigure in interface ConfigurationpreConfigure in class AbstractConfigurationExceptionpublic void addDiscoverableAnnotationHandler(AbstractDiscoverableAnnotationHandler handler)
public void deconfigure(WebAppContext context) throws Exception
deconfigure in interface Configurationdeconfigure in class AbstractConfigurationExceptionpublic void configure(WebAppContext context) throws Exception
configure in interface Configurationconfigure in class AbstractConfigurationExceptionAbstractConfiguration.configure(org.eclipse.jetty.webapp.WebAppContext)public void postConfigure(WebAppContext context) throws Exception
postConfigure in interface ConfigurationpostConfigure in class AbstractConfigurationExceptionAbstractConfiguration.postConfigure(org.eclipse.jetty.webapp.WebAppContext)protected void scanForAnnotations(WebAppContext context) throws Exception
context - Exceptionprotected AnnotationParser createAnnotationParser()
protected boolean isUseMultiThreading(WebAppContext context)
context - protected int getMaxScanWait(WebAppContext context)
context - public void cloneConfigure(WebAppContext template, WebAppContext context) throws Exception
cloneConfigure in interface ConfigurationcloneConfigure in class AbstractConfigurationExceptionAbstractConfiguration.cloneConfigure(org.eclipse.jetty.webapp.WebAppContext, org.eclipse.jetty.webapp.WebAppContext)public void createServletContainerInitializerAnnotationHandlers(WebAppContext context, List<ServletContainerInitializer> scis) throws Exception
context - scis - Exceptionpublic Resource getJarFor(ServletContainerInitializer service) throws MalformedURLException, IOException
MalformedURLExceptionIOExceptionpublic boolean isFromExcludedJar(WebAppContext context, ServletContainerInitializer sci, Resource sciResource) throws Exception
context - sci - Exceptionpublic boolean matchesExclusionPattern(ServletContainerInitializer sci)
context - sci - public boolean isFromContainerClassPath(WebAppContext context, ServletContainerInitializer sci)
context - sci - public List<ServletContainerInitializer> getNonExcludedInitializers(WebAppContext context) throws Exception
context - ServletContainerInitializersExceptionpublic AnnotationConfiguration.ServletContainerInitializerOrdering getInitializerOrdering(WebAppContext context)
public void parseContainerPath(WebAppContext context, AnnotationParser parser) throws Exception
context - parser - Exceptionpublic void parseWebInfLib(WebAppContext context, AnnotationParser parser) throws Exception
context - parser - Exceptionpublic void parseWebInfClasses(WebAppContext context, AnnotationParser parser) throws Exception
context - parser - Exceptionpublic FragmentDescriptor getFragmentFromJar(Resource jar, List<FragmentDescriptor> frags) throws Exception
jar - frags - Exceptionpublic boolean isMetaDataComplete(WebDescriptor d)
Copyright © 1995-2015 Webtide. All Rights Reserved.