Interface RebelServletRegistration


public interface RebelServletRegistration
Rebel wrapper for ServletRegistration implementations to avoid classloader and API issues when accessing it from our plugins. Since Servlet 3.0 Reveals mapping removal methods that could be optionally implemented by us.
  • Method Details

    • removeMapping

      boolean removeMapping(String urlPattern)
      Parameters:
      urlPattern - the url pattern to be removed
      Returns:
      true if removal was successful or no problems arose when success verification is not possible
    • isRemoveSupported

      boolean isRemoveSupported()
      Returns:
      true if this implementation allows to remove mappings
    • addMapping

      Set<String> addMapping(String... urlPatterns)
      Method inherited from original interface. Adds a servlet mapping with the given URL patterns for the Servlet represented by this ServletRegistration. If any of the specified URL patterns are already mapped to a different Servlet, no updates will be performed. If this method is called multiple times, each successive call adds to the effects of the former.
      Parameters:
      urlPatterns - the URL patterns of the servlet mapping
      Returns:
      the (possibly empty) Set of URL patterns that are already mapped to a different Servlet
      Throws:
      IllegalArgumentException - if urlPatterns is null or empty java.lang.IllegalStateException if the ServletContext from which this ServletRegistration was obtained has already been initialized
    • jrAddMapping

      Set<String> jrAddMapping(String... urlPatterns)
      Same as addMapping(String ... urlPatterns), but does not throw IllegalStateException if ServletContext is already initialized.
      Parameters:
      urlPatterns - the URL patterns of the servlet mapping
      Returns:
      the (possibly empty) Set of URL patterns that are already mapped to a different Servlet
      Throws:
      IllegalArgumentException - if urlPatterns is null or empty
    • getMappings

      Collection<String> getMappings()
      Method inherited from original interface. Gets the currently available mappings of the Servlet represented by this ServletRegistration. If permitted, any changes to the returned Collection must not affect this ServletRegistration.
      Returns:
      a (possibly empty) Collection of the currently available mappings of the Servlet represented by this ServletRegistration