org.eclipse.jetty.annotations
Class AnnotationConfiguration

java.lang.Object
  extended by org.eclipse.jetty.webapp.AbstractConfiguration
      extended by org.eclipse.jetty.annotations.AnnotationConfiguration
All Implemented Interfaces:
Configuration
Direct Known Subclasses:
AnnotationConfiguration

public class AnnotationConfiguration
extends AbstractConfiguration

Configuration for Annotations


Field Summary
static String CLASS_INHERITANCE_MAP
           
static String CONTAINER_INITIALIZERS
           
 
Constructor Summary
AnnotationConfiguration()
           
 
Method Summary
protected  void clearAnnotationList(List<AnnotationParser.DiscoverableAnnotationHandler> handlers)
           
 void cloneConfigure(WebAppContext template, WebAppContext context)
          Clone configuration instance.
 void configure(WebAppContext context)
          Configure WebApp.
protected  AnnotationParser createAnnotationParser()
           
protected  void gatherAnnotations(List<DiscoveredAnnotation> annotations, List<AnnotationParser.DiscoverableAnnotationHandler> handlers)
           
 FragmentDescriptor getFragmentFromJar(Resource jar, List<FragmentDescriptor> frags)
           
 List<ServletContainerInitializer> getNonExcludedInitializers(WebAppContext context)
           
 boolean isFromExcludedJar(WebAppContext context, ServletContainerInitializer service)
          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)
           
 void parseContainerPath(WebAppContext context, AnnotationParser parser)
           
 void parseWebInfClasses(WebAppContext context, AnnotationParser parser)
           
 void parseWebInfLib(WebAppContext context, AnnotationParser parser)
           
 void preConfigure(WebAppContext context)
          Set up for configuration.
 AnnotationParser registerServletContainerInitializerAnnotationHandlers(WebAppContext context, AnnotationParser parser, List<ServletContainerInitializer> scis)
           
 
Methods inherited from class org.eclipse.jetty.webapp.AbstractConfiguration
deconfigure, destroy, postConfigure
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CLASS_INHERITANCE_MAP

public static final String CLASS_INHERITANCE_MAP
See Also:
Constant Field Values

CONTAINER_INITIALIZERS

public static final String CONTAINER_INITIALIZERS
See Also:
Constant Field Values
Constructor Detail

AnnotationConfiguration

public AnnotationConfiguration()
Method Detail

preConfigure

public void preConfigure(WebAppContext context)
                  throws Exception
Description copied from interface: Configuration
Set up for configuration.

Typically this step discovers configuration resources

Specified by:
preConfigure in interface Configuration
Overrides:
preConfigure in class AbstractConfiguration
Parameters:
context - The context to configure
Throws:
Exception

configure

public void configure(WebAppContext context)
               throws Exception
Description copied from interface: Configuration
Configure WebApp.

Typically this step applies the discovered configuration resources to either the WebAppContext or the associated MetaData.

Specified by:
configure in interface Configuration
Overrides:
configure in class AbstractConfiguration
Parameters:
context - The context to configure
Throws:
Exception

createAnnotationParser

protected AnnotationParser createAnnotationParser()
Returns:
a new AnnotationParser. This method can be overridden to use a different impleemntation of the AnnotationParser. Note that this is considered internal API.

cloneConfigure

public void cloneConfigure(WebAppContext template,
                           WebAppContext context)
                    throws Exception
Description copied from interface: Configuration
Clone configuration instance.

Configure an instance of a WebAppContext, based on a template WebAppContext that has previously been configured by this Configuration.

Specified by:
cloneConfigure in interface Configuration
Overrides:
cloneConfigure in class AbstractConfiguration
Parameters:
template - The template context
context - The context to configure
Throws:
Exception

registerServletContainerInitializerAnnotationHandlers

public AnnotationParser registerServletContainerInitializerAnnotationHandlers(WebAppContext context,
                                                                              AnnotationParser parser,
                                                                              List<ServletContainerInitializer> scis)
                                                                       throws Exception
Throws:
Exception

isFromExcludedJar

public boolean isFromExcludedJar(WebAppContext context,
                                 ServletContainerInitializer service)
                          throws Exception
Check to see if the ServletContainerIntializer loaded via the ServiceLoader came from a jar that is excluded by the fragment ordering. See ServletSpec 3.0 p.85.

Parameters:
orderedJars -
service -
Returns:
Throws:
Exception

getNonExcludedInitializers

public List<ServletContainerInitializer> getNonExcludedInitializers(WebAppContext context)
                                                             throws Exception
Throws:
Exception

parseContainerPath

public void parseContainerPath(WebAppContext context,
                               AnnotationParser parser)
                        throws Exception
Throws:
Exception

parseWebInfLib

public void parseWebInfLib(WebAppContext context,
                           AnnotationParser parser)
                    throws Exception
Throws:
Exception

parseWebInfClasses

public void parseWebInfClasses(WebAppContext context,
                               AnnotationParser parser)
                        throws Exception
Throws:
Exception

getFragmentFromJar

public FragmentDescriptor getFragmentFromJar(Resource jar,
                                             List<FragmentDescriptor> frags)
                                      throws Exception
Throws:
Exception

isMetaDataComplete

public boolean isMetaDataComplete(WebDescriptor d)

clearAnnotationList

protected void clearAnnotationList(List<AnnotationParser.DiscoverableAnnotationHandler> handlers)

gatherAnnotations

protected void gatherAnnotations(List<DiscoveredAnnotation> annotations,
                                 List<AnnotationParser.DiscoverableAnnotationHandler> handlers)


Copyright © 1995-2012 Mort Bay Consulting. All Rights Reserved.