## org.mortbay.jetty.plus.webapp
Class AbstractConfiguration

    java.lang.Object
      org.mortbay.jetty.webapp.WebXmlConfiguration
          org.mortbay.jetty.plus.webapp.AbstractConfiguration

All Implemented Interfaces:
  Serializable, Configuration

Direct Known Subclasses:
  Configuration

    public abstract class AbstractConfiguration

extends WebXmlConfiguration

Configuration

See Also:
  Serialized Form

Field Summary
`protected LifeCycleCallbackCollection` `_callbacks`
`protected InjectionCollection` `_injections`
`protected RunAsCollection` `_runAsCollection`

Fields inherited from class org.mortbay.jetty.webapp.WebXmlConfiguration
`_constraintMappings, _context, _defaultWelcomeFileList, _errorPages, _filterMappings, _filters, _hasJSP, _jspServletClass, _jspServletName, _listeners, _servletHandler, _servletMappings, _servlets, _version, _welcomeFiles, _xmlParser`

Constructor Summary
`AbstractConfiguration()`

Method Summary
`abstract void` `bindEnvEntry(String name, Object value)`
`abstract void` `bindMessageDestinationRef(String name, Class type)`
`abstract void` `bindResourceEnvRef(String name, Class type)`
`abstract void` `bindResourceRef(String name, Class type)`
`abstract void` `bindUserTransaction()`
`protected void` `callPreDestroyCallbacks()`
`void` `configure(String webXml)`
`void` `configureDefaults()` Configure Defaults.
`void` `configureWebApp()` Configure WebApp.
`void` `deconfigureWebApp()` DeConfigure WebApp.
`protected void` `initEnvEntry(XmlParser.Node node)` JavaEE 5.4.1.3
`protected void` `initialize(XmlParser.Node config)`
`protected void` `initInjection(XmlParser.Node node, String jndiName, Class valueClass)` Iterate over the <injection-target> entries for a node
`protected void` `initMessageDestinationRef(XmlParser.Node node)` Common Annotations Spec section 2.3: message-destination-ref is for: - javax.jms.Queue - javax.jms.Topic
`protected void` `initPostConstruct(XmlParser.Node node)` Process <post-construct>
`protected void` `initPreDestroy(XmlParser.Node node)` Process <pre-destroy>
`protected void` `initResourceEnvRef(XmlParser.Node node)` Common Annotations Spec section 2.3: resource-env-ref is for: - javax.transaction.UserTransaction - javax.resource.cci.InteractionSpec - anything else that is not a connection factory
`protected void` `initResourceRef(XmlParser.Node node)` Common Annotations Spec section 2.3: resource-ref is for: - javax.sql.DataSource - javax.jms.ConnectionFactory - javax.jms.QueueConnectionFactory - javax.jms.TopicConnectionFactory - javax.mail.Session - java.net.URL - javax.resource.cci.ConnectionFactory - org.omg.CORBA_2_3.ORB - any other connection factory defined by a resource adapter
`protected void` `initWebXmlElement(String element, XmlParser.Node node)` Handle web.xml element.
`protected void` `injectAndCallPostConstructCallbacks()`
`protected abstract void` `parseAnnotations()` Parse all classes that are mentioned in web.xml (servlets, filters, listeners) for annotations.
`void` `setWebAppContext(WebAppContext context)` Set up a context on which to perform the configuration.

Methods inherited from class org.mortbay.jetty.webapp.WebXmlConfiguration

`configureClassLoader, findWebXml, getJSPServletName, getWebAppContext, initContextParam, initDisplayName, initDistributable, initErrorPage, initFilter, initFilterMapping, initJspConfig, initListener, initLocaleEncodingList, initLoginConfig, initMimeConfig, initSecurityConstraint, initSecurityRole, initServlet, initServletMapping, initSessionConfig, initTagLib, initWelcomeFileList, newListenerInstance, normalizePattern, webXmlParser`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### _callbacks

    protected LifeCycleCallbackCollection _callbacks

### _injections

    protected InjectionCollection _injections

### _runAsCollection

    protected RunAsCollection _runAsCollection

Constructor Detail

### AbstractConfiguration

    public AbstractConfiguration()

Method Detail

### bindEnvEntry

    public abstract void bindEnvEntry(String name,
                                      Object value)
                               throws Exception

  Throws:
    `Exception`

### bindResourceRef

    public abstract void bindResourceRef(String name,
                                         Class type)
                                  throws Exception

  Throws:
    `Exception`

### bindResourceEnvRef

    public abstract void bindResourceEnvRef(String name,
                                            Class type)
                                     throws Exception

  Throws:
    `Exception`

### bindUserTransaction

    public abstract void bindUserTransaction()
                                      throws Exception

  Throws:
    `Exception`

### bindMessageDestinationRef

    public abstract void bindMessageDestinationRef(String name,
                                                   Class type)
                                            throws Exception

  Throws:
    `Exception`

### setWebAppContext

    public void setWebAppContext(WebAppContext context)

  Description copied from interface: `Configuration`
  Set up a context on which to perform the configuration.

  Specified by:
    `setWebAppContext` in interface `Configuration`
  Overrides:
    `setWebAppContext` in class `WebXmlConfiguration`

### configureDefaults

    public void configureDefaults()
                           throws Exception

  Description copied from interface: `Configuration`
  Configure Defaults. This method is called to intialize the context to the containers default configuration. Typically this would mean application of the webdefault.xml file.

  Specified by:
    `configureDefaults` in interface `Configuration`
  Overrides:
    `configureDefaults` in class `WebXmlConfiguration`
  Throws:
    `Exception`

### configureWebApp

    public void configureWebApp()
                         throws Exception

  Description copied from interface: `Configuration`
  Configure WebApp. This method is called to apply the standard and vendor deployment descriptors. Typically this is web.xml and jetty-web.xml.

  Specified by:
    `configureWebApp` in interface `Configuration`
  Overrides:
    `configureWebApp` in class `WebXmlConfiguration`
  Throws:
    `Exception`

### deconfigureWebApp

    public void deconfigureWebApp()
                           throws Exception

  Description copied from interface: `Configuration`
  DeConfigure WebApp. This method is called to undo all configuration done to this webapphandler. This is called to allow the context to work correctly over a stop/start cycle

  Specified by:
    `deconfigureWebApp` in interface `Configuration`
  Overrides:
    `deconfigureWebApp` in class `WebXmlConfiguration`
  Throws:
    `Exception`

### configure

    public void configure(String webXml)
                   throws Exception

  Overrides:
    `configure` in class `WebXmlConfiguration`
  Throws:
    `Exception`

### initialize

    protected void initialize(XmlParser.Node config)
                       throws ClassNotFoundException,
                              UnavailableException

  Overrides:
    `initialize` in class `WebXmlConfiguration`
  Throws:
    `ClassNotFoundException`
    `UnavailableException`

### initWebXmlElement

    protected void initWebXmlElement(String element,
                                     XmlParser.Node node)
                              throws Exception

  Description copied from class: `WebXmlConfiguration`
  Handle web.xml element. This method is called for each top level element within the web.xml file. It may be specialized by derived WebAppHandlers to provide additional configuration and handling.

  Overrides:
    `initWebXmlElement` in class `WebXmlConfiguration`
  Parameters:
    `element` - The element name
    `node` - The node containing the element.
  Throws:
    `Exception`

### initEnvEntry

    protected void initEnvEntry(XmlParser.Node node)
                         throws Exception

  JavaEE 5.4.1.3

  Parameters:
    `node` -
  Throws:
    `Exception`

### initResourceRef

    protected void initResourceRef(XmlParser.Node node)
                            throws Exception

  Common Annotations Spec section 2.3: resource-ref is for: - javax.sql.DataSource - javax.jms.ConnectionFactory - javax.jms.QueueConnectionFactory - javax.jms.TopicConnectionFactory - javax.mail.Session - java.net.URL - javax.resource.cci.ConnectionFactory - org.omg.CORBA_2_3.ORB - any other connection factory defined by a resource adapter

  Parameters:
    `node` -
  Throws:
    `Exception`

### initResourceEnvRef

    protected void initResourceEnvRef(XmlParser.Node node)
                               throws Exception

  Common Annotations Spec section 2.3: resource-env-ref is for: - javax.transaction.UserTransaction - javax.resource.cci.InteractionSpec - anything else that is not a connection factory

  Parameters:
    `node` -
  Throws:
    `Exception`

### initMessageDestinationRef

    protected void initMessageDestinationRef(XmlParser.Node node)
                                      throws Exception

  Common Annotations Spec section 2.3: message-destination-ref is for: - javax.jms.Queue - javax.jms.Topic

  Parameters:
    `node` -
  Throws:
    `Exception`

### initPostConstruct

    protected void initPostConstruct(XmlParser.Node node)

  Process <post-construct>

  Parameters:
    `node` -

### initPreDestroy

    protected void initPreDestroy(XmlParser.Node node)

  Process <pre-destroy>

  Parameters:
    `node` -

### initInjection

    protected void initInjection(XmlParser.Node node,
                                 String jndiName,
                                 Class valueClass)

  Iterate over the <injection-target> entries for a node

  Parameters:
    `node` -
    `jndiName` -
    `valueClass` -

### parseAnnotations

    protected abstract void parseAnnotations()
                                      throws Exception

  Parse all classes that are mentioned in web.xml (servlets, filters, listeners) for annotations.

  Throws:
    `Exception`

### injectAndCallPostConstructCallbacks

    protected void injectAndCallPostConstructCallbacks()
                                                throws Exception

  Throws:
    `Exception`

### callPreDestroyCallbacks

    protected void callPreDestroyCallbacks()
                                    throws Exception

  Throws:
    `Exception`

Copyright © 2007 Mort Bay Consulting. All Rights Reserved.