Class HttpServerExpectationFilter

    • Constructor Detail

      • HttpServerExpectationFilter

        public HttpServerExpectationFilter()
    • Method Detail

      • verify

        protected boolean verify​(ClassicHttpRequest request,
                                 HttpContext context)
                          throws HttpException
        Verifies the HTTP request and decides whether it meets server expectations and the request processing can continue.
        Parameters:
        request - the incoming HTTP request.
        context - the actual execution context.
        Returns:
        true if the request meets expectations or false otherwise.
        Throws:
        HttpException
      • generateResponseContent

        protected HttpEntity generateResponseContent​(HttpResponse expectationFailed)
                                              throws HttpException
        Generates response content entity for the final HTTP response with an error status representing the cause of expectation failure.
        Parameters:
        expectationFailed - the final HTTP response.
        Returns:
        the content entity for the final HTTP response with an error status representing the cause of expectation failure.
        Throws:
        HttpException