Class HttpWebApplicationServerRequestMapper

java.lang.Object
cloud.piranha.http.webapp.HttpWebApplicationServerRequestMapper
All Implemented Interfaces:
WebApplicationServerRequestMapper

public class HttpWebApplicationServerRequestMapper extends Object implements WebApplicationServerRequestMapper
The default WebApplicationServerRequestMapper.
Author:
Manfred Riem ([email protected])
  • Constructor Details

    • HttpWebApplicationServerRequestMapper

      public HttpWebApplicationServerRequestMapper()
  • Method Details

    • addMapping

      public Set<String> addMapping(WebApplication webApplication, String... urlPatterns)
      Add a mapping.
      Specified by:
      addMapping in interface WebApplicationServerRequestMapper
      Parameters:
      webApplication - the web application.
      urlPatterns - the url patterns to map (aka mappings).
      Returns:
      the url patterns not added.
    • findMapping

      public WebApplication findMapping(String path)
      Find a mapping for the given path.
      Specified by:
      findMapping in interface WebApplicationServerRequestMapper
      Parameters:
      path - the path.
      Returns:
      the mapping, or null if not found.
    • findPrefixMatch

      public String findPrefixMatch(String path, String currentPrefix)
      Find a mapping with a prefix mapping longer than the given current prefix.
      Parameters:
      path - the path.
      currentPrefix - the current matched prefix.
      Returns:
      the mapping, or null if not found.