Interface ServletInvocation

All Known Implementing Classes:
DefaultServletInvocation

public interface ServletInvocation
The ServletInvocation API.

This type holds data necessary to invoke a Servlet.

Author:
Arjan Tijms
  • Method Details

    • getInvocationPath

      String getInvocationPath()
      The original path used to base the Servlet invocation on.
      Returns:
      the full invocation path
    • getServletName

      String getServletName()
      Returns the servlet name.
      Returns:
      the servlet name
    • getServletPath

      String getServletPath()
      Returns the servlet path.
      Returns:
      the servlet path
    • getOriginalServletPath

      default String getOriginalServletPath()
      Gets the original servlet path.

      The original servlet path differs from the servlet path if the invocation locator has found an alternative resource than the one requested. This is typically the case for welcome pages.

      Returns:
      the original servlet path.
    • getPathInfo

      String getPathInfo()
      Returns the path info.
      Returns:
      the path info
    • getApplicationRequestMapping

      WebApplicationRequestMapping getApplicationRequestMapping()
      Returns the web application request mapping.
      Returns:
      the web application request mapping
    • getServletEnvironment

      ServletEnvironment getServletEnvironment()
      Returns the servlet environment.
      Returns:
      the servlet environment
    • getFilterEnvironments

      List<FilterEnvironment> getFilterEnvironments()
      Returns the filter environments.
      Returns:
      the filter environments
    • getFilterChain

      FilterChain getFilterChain()
      Returns the filter chain.
      Returns:
      the filter chain
    • isFromNamed

      default boolean isFromNamed()
      Returns whether this invocation is obtained from a getNamedDispatcher.
      Returns:
      whether this invocation is obtained from a getNamedDispatcher
    • setFromNamed

      default void setFromNamed(boolean fromNamed)
      Parameters:
      fromNamed - whether this invocation is obtained from a getNamedDispatcher
    • hasServlet

      default boolean hasServlet()
      Do we have a servlet.
      Returns:
      true if we do, false otherwise.
    • hasFilter

      default boolean hasFilter()
      Do we have a filter.
      Returns:
      true if we do, false otherwise.
    • isServletUnavailable

      default boolean isServletUnavailable()
      Is the servlet unavailable.
      Returns:
      true if it is, false otherwise.
    • canInvoke

      default boolean canInvoke()
      Can we invoke.
      Returns:
      true if we can, false otherwise.
    • getServletConfig

      default ServletConfig getServletConfig()
      Returns the servlet configuration.
      Returns:
      the servlet configuration