Class DefaultWebApplicationServerRequestMapper

java.lang.Object
cloud.piranha.appserver.impl.DefaultWebApplicationServerRequestMapper
All Implemented Interfaces:
WebApplicationServerRequestMapper

public class DefaultWebApplicationServerRequestMapper
extends java.lang.Object
implements WebApplicationServerRequestMapper
The default WebApplicationServerRequestMapper.
Author:
Manfred Riem ([email protected])
  • Constructor Summary

    Constructors 
    Constructor Description
    DefaultWebApplicationServerRequestMapper()  
  • Method Summary

    Modifier and Type Method Description
    java.util.Set<java.lang.String> addMapping​(WebApplication webApplication, java.lang.String... urlPatterns)
    Add a mapping.
    WebApplication findMapping​(java.lang.String path)
    Find a mapping for the given path.
    java.lang.String findPrefixMatch​(java.lang.String path, java.lang.String currentPrefix)
    Find a mapping with a prefix mapping longer than the given current prefix.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

  • Method Details

    • addMapping

      public java.util.Set<java.lang.String> addMapping​(WebApplication webApplication, java.lang.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​(java.lang.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 java.lang.String findPrefixMatch​(java.lang.String path, java.lang.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.