Package cloud.piranha

Class DefaultWebApplicationRequestMapper

  • java.lang.Object
    • cloud.piranha.DefaultWebApplicationRequestMapper
  • All Implemented Interfaces:
    cloud.piranha.api.WebApplicationRequestMapper


    public class DefaultWebApplicationRequestMapper
    extends java.lang.Object
    implements cloud.piranha.api.WebApplicationRequestMapper
    The default WebApplicationRequestMapper.
    Author:
    Manfred Riem (mriem@manorrock.com)
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected java.util.List<cloud.piranha.api.FilterMapping> filterMappings
      Stores the filter mappings.
      protected java.util.concurrent.ConcurrentHashMap<java.lang.String,java.lang.String> servletMappings
      Stores the servlet mappings.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.util.Set<java.lang.String> addFilterMapping​(java.lang.String filterName, java.lang.String... urlPatterns)  
      java.util.Set<java.lang.String> addFilterMappingBeforeExisting​(java.lang.String filterName, java.lang.String... urlPatterns)  
      java.util.Set<java.lang.String> addServletMapping​(java.lang.String servletName, java.lang.String... urlPatterns)
      Add a servlet mapping.
      java.util.Collection<java.lang.String> findFilterMappings​(java.lang.String path)
      Find the filter mappings.
      DefaultWebApplicationRequestMapping findServletMapping​(java.lang.String path)
      Find a servlet mapping for the given path.
      java.util.Collection<java.lang.String> getServletMappings​(java.lang.String servletName)
      Get the mappings for the specified servlet.
      java.lang.String getServletName​(java.lang.String mapping)
      Get the servlet name for the specified mapping..
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • filterMappings

        protected final java.util.List<cloud.piranha.api.FilterMapping> filterMappings
        Stores the filter mappings.
      • servletMappings

        protected final java.util.concurrent.ConcurrentHashMap<java.lang.String,java.lang.String> servletMappings
        Stores the servlet mappings.
    • Constructor Detail

      • DefaultWebApplicationRequestMapper

        public DefaultWebApplicationRequestMapper​()
    • Method Detail

      • addFilterMapping

        public java.util.Set<java.lang.String> addFilterMapping​(java.lang.String filterName,
                                                                java.lang.String... urlPatterns)
        Specified by:
        addFilterMapping in interface cloud.piranha.api.WebApplicationRequestMapper
      • addFilterMappingBeforeExisting

        public java.util.Set<java.lang.String> addFilterMappingBeforeExisting​(java.lang.String filterName,
                                                                              java.lang.String... urlPatterns)
        Specified by:
        addFilterMappingBeforeExisting in interface cloud.piranha.api.WebApplicationRequestMapper
      • addServletMapping

        public java.util.Set<java.lang.String> addServletMapping​(java.lang.String servletName,
                                                                 java.lang.String... urlPatterns)
        Add a servlet mapping.
        Specified by:
        addServletMapping in interface cloud.piranha.api.WebApplicationRequestMapper
        Parameters:
        servletName - the servlet name.
        urlPatterns - the URL patterns to map (aka mappings).
        Returns:
        the URL patterns that were already added.
      • findFilterMappings

        public java.util.Collection<java.lang.String> findFilterMappings​(java.lang.String path)
        Find the filter mappings.
        Specified by:
        findFilterMappings in interface cloud.piranha.api.WebApplicationRequestMapper
        Parameters:
        path - the path.
        Returns:
        the filter mappings.
      • findServletMapping

        public DefaultWebApplicationRequestMapping findServletMapping​(java.lang.String path)
        Find a servlet mapping for the given path.
        Specified by:
        findServletMapping in interface cloud.piranha.api.WebApplicationRequestMapper
        Parameters:
        path - the path.
        Returns:
        the mapping, or null if not found.
      • getServletMappings

        public java.util.Collection<java.lang.String> getServletMappings​(java.lang.String servletName)
        Get the mappings for the specified servlet.
        Specified by:
        getServletMappings in interface cloud.piranha.api.WebApplicationRequestMapper
        Parameters:
        servletName - the servlet name.
        Returns:
        the mappings, or an empty collection if none.
      • getServletName

        public java.lang.String getServletName​(java.lang.String mapping)
        Get the servlet name for the specified mapping..
        Specified by:
        getServletName in interface cloud.piranha.api.WebApplicationRequestMapper
        Parameters:
        mapping - the mapping.
        Returns:
        the servlet name, or null if not found.

Copyright © 2020 Piranha Cloud. All rights reserved.