Interface ServletDetails


public interface ServletDetails
Details about a Servlet.
Author:
Michael Vorburger.ch
  • Method Details

    • servlet

      @NonNull javax.servlet.Servlet servlet()
      Get a Servlet instance.
      Returns:
      Servlet instance
    • name

      @NonNull String name()
      Get Servlet's name.
      Returns:
      String servlet name
    • urlPatterns

      @NonNull List<String> urlPatterns()
      Get list of servlet URL patterns. These patterns control how you access a servlet.

      Restrictions to URLs and how it should look like are next:

      • A string beginning with a ‘ / ’ character and ending with a ‘ /*’ suffix is used for path mapping.
      • A string beginning with a ‘ *. ’ prefix is used as an extension mapping.
      • The empty string ("") is a special URL pattern that exactly maps to the application's context root, i.e., requests of the form http://host:port/context-root. In this case the path info is ’ / ’ and the servlet path and context path is empty string (““).
      • A string containing only the ’ / ’ character indicates the "default" servlet of the application. In this case the servlet path is the request URI minus the context path and the path info is null.
      • All other strings are used for exact matches only.
      Returns:
      List of Servlet URL patterns
      See Also:
      • "Java Servlet Specification Version 3.1, Section 12.2 Specification of Mappings"
    • initParams

      @NonNull Map<String,String> initParams()
      Get Servlet initial parameters.
      Returns:
      Map that contains initial parameters
    • asyncSupported

      boolean asyncSupported()
      Get indication whether servlet() supports asynchronous processing.
      Returns:
      true if the filter supports asynchronous processing
      See Also:
      • "Java Servlet Specification Version 3.1, Section 2.3.3.3 Asynchronous Processing"
    • builder

      static @NonNull ServletDetails.Builder builder()
      Create a builder for ServletDetails.
      Returns:
      ServletDetails.Builder builder instance