Interface JerseyApplicationPath

All Known Implementing Classes:
DefaultJerseyApplicationPath
Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@FunctionalInterface public interface JerseyApplicationPath
Interface that can be used by auto-configurations that need path details Jersey's application path that serves as the base URI for the application.
Since:
2.0.7
Author:
Madhura Bhave
  • Method Summary

    Modifier and Type
    Method
    Description
    Returns the configured path of the application.
    default String
    Return a cleaned up version of the path that can be used as a prefix for URLs.
    default String
    Return a form of the given path that's relative to the Jersey application path.
    default String
    Return a URL mapping pattern that can be used with a ServletRegistrationBean to map Jersey's servlet.
  • Method Details

    • getPath

      String getPath()
      Returns the configured path of the application.
      Returns:
      the configured path
    • getRelativePath

      default String getRelativePath(String path)
      Return a form of the given path that's relative to the Jersey application path.
      Parameters:
      path - the path to make relative
      Returns:
      the relative path
    • getPrefix

      default String getPrefix()
      Return a cleaned up version of the path that can be used as a prefix for URLs. The resulting path will have path will not have a trailing slash.
      Returns:
      the prefix
      See Also:
    • getUrlMapping

      default String getUrlMapping()
      Return a URL mapping pattern that can be used with a ServletRegistrationBean to map Jersey's servlet.
      Returns:
      the path as a servlet URL mapping