org.richfaces.webapp

## Class GenericServletContainerInitializer

- java.lang.Object
- - org.richfaces.webapp.GenericServletContainerInitializer

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

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

  Provides common functionality for `ServletContainerInitializer` implementatios.

  Author:
    Lukas Fryc

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `GenericServletContainerInitializer()`

  - ### 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

    - #### GenericServletContainerInitializer

          public GenericServletContainerInitializer()

  - ### 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 © 2012 JBoss by Red Hat. All Rights Reserved.