org.richfaces.servlet

## Class AbstractServletContainerInitializer

- java.lang.Object
- - org.richfaces.servlet.AbstractServletContainerInitializer

- All Implemented Interfaces:
    javax.servlet.ServletContainerInitializer
  Direct Known Subclasses:
    PushServletContainerInitializer, ResourceServletContainerInitializer

      public abstract class AbstractServletContainerInitializer
      extends Object
      implements javax.servlet.ServletContainerInitializer

  Provides common functionality for `ServletContainerInitializer` implementatios.

  Author:
    Lukas Fryc

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `AbstractServletContainerInitializer()`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `protected javax.servlet.ServletRegistration` | `getServletRegistration(Class<? extends javax.servlet.Servlet> servletClass, javax.servlet.ServletContext context)` Returns the servlet registration for given `Servlet` class, which has at least one mapping registered.
    `protected boolean` | `hasFilterMapping(Class<? extends javax.servlet.Filter> filterClass, javax.servlet.ServletContext context)` Detects if given `Filter` class has been already registered.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

    - ### Methods inherited from interface javax.servlet.ServletContainerInitializer

      `onStartup`

- - ### Constructor Detail

    - #### AbstractServletContainerInitializer

          public AbstractServletContainerInitializer()

  - ### Method Detail

    - #### hasFilterMapping

          protected boolean hasFilterMapping(Class<? extends javax.servlet.Filter> filterClass,
                                 javax.servlet.ServletContext context)

      Detects if given `Filter` class has been already registered.
      Parameters:
        `filterClass` - `Filter` implementation class
        `context` - to search for registration
      Returns:
        true if given `Filter` class has been already registered.

    - #### getServletRegistration

          protected javax.servlet.ServletRegistration getServletRegistration(Class<? extends javax.servlet.Servlet> servletClass,
                                                                 javax.servlet.ServletContext context)

      Returns the servlet registration for given `Servlet` class, which has at least one mapping registered.

      Returns null otherwise.

      Parameters:
        `servletClass` - `Servlet` implementation class
        `context` - to search for registration
      Returns:
        the servlet registration for given `Servlet` class, which has at least one mapping registered, null otherwise.

Copyright © 2014 JBoss by Red Hat. All rights reserved.