Top Description Inners Methods
org.apache.hc.core5.http.io

public Interface HttpServerRequestHandler

Known Direct Implementers
org.apache.hc.core5.http.io.support.BasicHttpServerExpectationDecorator, org.apache.hc.core5.http.io.support.BasicHttpServerRequestHandler, org.apache.hc.core5.http.io.support.HttpServerFilterChainRequestHandler
Annotations
@Contract
threading:STATELESS
Imports
java.io.IOException, org.apache.hc.core5.annotation.Contract, .ThreadingBehavior, org.apache.hc.core5.http.ClassicHttpRequest, .ClassicHttpResponse, .HttpException, org.apache.hc.core5.http.protocol.HttpContext

HttpServerRequestHandler represents a routine for processing of a specific group of HTTP requests. Request execution filters are designed to take care of protocol specific aspects, whereas individual request handlers are expected to take care of application specific HTTP processing. The main purpose of a request handler is to generate a response object with a content entity to be sent back to the client in response to the given request.
Since
5.0

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static interface
HttpServerRequestHandler.ResponseTrigger

Response trigger that can be used to submit a final HTTP response and terminate HTTP request processing.

Method Summary

Modifier and TypeMethod and Description
public void
handle(ClassicHttpRequest
the actual request.
request
,
HttpServerRequestHandler.ResponseTrigger
the response trigger.
responseTrigger
,
HttpContext
the actual execution context.
context
)

Handles the request and submits a final response to be sent back to the client.

Method Detail

handleback to summary
public void handle(ClassicHttpRequest request, HttpServerRequestHandler.ResponseTrigger responseTrigger, HttpContext context) throws HttpException, IOException

Handles the request and submits a final response to be sent back to the client.

Parameters
request:ClassicHttpRequest

the actual request.

responseTrigger:HttpServerRequestHandler.ResponseTrigger

the response trigger.

context:HttpContext

the actual execution context.

org.apache.hc.core5.http.io back to summary

public Interface HttpServerRequestHandler.ResponseTrigger


Response trigger that can be used to submit a final HTTP response and terminate HTTP request processing.

Method Summary

Modifier and TypeMethod and Description
public void
sendInformation(ClassicHttpResponse
the intermediate (1xx) HTTP response
response
)

Sends an intermediate informational HTTP response to the client.

public void
submitResponse(ClassicHttpResponse
the final (non 1xx) HTTP response
response
)

Sends a final HTTP response to the client.

Method Detail

sendInformationback to summary
public void sendInformation(ClassicHttpResponse response) throws HttpException, IOException

Sends an intermediate informational HTTP response to the client.

Parameters
response:ClassicHttpResponse

the intermediate (1xx) HTTP response

submitResponseback to summary
public void submitResponse(ClassicHttpResponse response) throws HttpException, IOException

Sends a final HTTP response to the client.

Parameters
response:ClassicHttpResponse

the final (non 1xx) HTTP response