Interface IXServletLowLevelFilter

    • Method Summary

      All Methods Instance Methods Abstract Methods Default Methods 
      Modifier and Type Method Description
      default void afterRequest​(javax.servlet.http.HttpServletRequest aHttpRequest, javax.servlet.http.HttpServletResponse aHttpResponse, com.helger.http.EHttpVersion eHttpVersion, com.helger.commons.http.EHttpMethod eHttpMethod, boolean bInvokeHandler, Throwable aCaughtException, boolean bIsHandledAsync)
      Invoked after an XServlet request was handled.
      com.helger.commons.state.EContinue beforeRequest​(javax.servlet.http.HttpServletRequest aHttpRequest, javax.servlet.http.HttpServletResponse aHttpResponse, com.helger.http.EHttpVersion eHttpVersion, com.helger.commons.http.EHttpMethod eHttpMethod)
      Invoked before an XServlet request is handled.
    • Method Detail

      • beforeRequest

        @Nonnull
        com.helger.commons.state.EContinue beforeRequest​(@Nonnull
                                                         javax.servlet.http.HttpServletRequest aHttpRequest,
                                                         @Nonnull
                                                         javax.servlet.http.HttpServletResponse aHttpResponse,
                                                         @Nonnull
                                                         com.helger.http.EHttpVersion eHttpVersion,
                                                         @Nonnull
                                                         com.helger.commons.http.EHttpMethod eHttpMethod)
                                                  throws javax.servlet.ServletException,
                                                         IOException
        Invoked before an XServlet request is handled. This method is created before the request is created! Exceptions occurring in this method will be propagated to the outside, so be careful :)
        Parameters:
        aHttpRequest - HTTP servlet request. Never null.
        aHttpResponse - HTTP servlet response. Never null.
        eHttpVersion - HTTP version. Never null.
        eHttpMethod - HTTP method. Never null.
        Returns:
        EContinue.CONTINUE to continue processing, or EContinue.BREAK if this request should not be processed, in which case the HttpServletResponse must contain a valid response!
        Throws:
        javax.servlet.ServletException - in case of business logic error.
        IOException - in case of IO error.
      • afterRequest

        default void afterRequest​(@Nonnull
                                  javax.servlet.http.HttpServletRequest aHttpRequest,
                                  @Nonnull
                                  javax.servlet.http.HttpServletResponse aHttpResponse,
                                  @Nonnull
                                  com.helger.http.EHttpVersion eHttpVersion,
                                  @Nonnull
                                  com.helger.commons.http.EHttpMethod eHttpMethod,
                                  boolean bInvokeHandler,
                                  @Nullable
                                  Throwable aCaughtException,
                                  boolean bIsHandledAsync)
                           throws javax.servlet.ServletException,
                                  IOException
        Invoked after an XServlet request was handled. After is always called, even if before request was canceled (in a finally)! Exceptions occurring in this method will be propagated to the outside, so be careful :)
        Note: the response cannot be modified in implementations of this method - they should be considered read-only. Also HTTP headers can usually NOT be modified in this method.
        Parameters:
        aHttpRequest - HTTP servlet request. Never null.
        aHttpResponse - HTTP servlet response. Never null.
        eHttpVersion - HTTP version. Never null.
        eHttpMethod - HTTP method. Never null.
        bInvokeHandler - true if the main handler was invoked, false if beforeRequest(HttpServletRequest, HttpServletResponse, EHttpVersion, EHttpMethod) avoided the execution of the request.
        aCaughtException - An optionally caught exception. May be null. The exception was already logged, so please don't log it again!
        bIsHandledAsync - true if the request is handled asynchronously
        Throws:
        javax.servlet.ServletException - in case of business logic error
        IOException - in case of IO error