Top Description Fields Constructors Methods
org.apache.hc.core5.http.protocol

public final Class DefaultHttpProcessor

extends Object
implements HttpProcessor
Class Inheritance
All Implemented Interfaces
org.apache.hc.core5.http.protocol.HttpProcessor, org.apache.hc.core5.http.HttpResponseInterceptor, org.apache.hc.core5.http.HttpRequestInterceptor
Annotations
@Contract
threading:IMMUTABLE_CONDITIONAL
Imports
java.io.IOException, java.util.List, org.apache.hc.core5.annotation.Contract, .ThreadingBehavior, org.apache.hc.core5.http.EntityDetails, .HttpException, .HttpRequest, .HttpRequestInterceptor, .HttpResponse, .HttpResponseInterceptor

Default immutable implementation of HttpProcessor.
Since
5.0

Field Summary

Modifier and TypeField and Description
private final HttpRequestInterceptor[]
private final HttpResponseInterceptor[]

Constructor Summary

AccessConstructor and Description
public
DefaultHttpProcessor(final HttpRequestInterceptor[] requestInterceptors, final HttpResponseInterceptor[] responseInterceptors)

public
DefaultHttpProcessor(final List<HttpRequestInterceptor> requestInterceptors, final List<HttpResponseInterceptor> responseInterceptors)

public
DefaultHttpProcessor(final HttpRequestInterceptor... requestInterceptors)

public
DefaultHttpProcessor(final HttpResponseInterceptor... responseInterceptors)

Method Summary

Modifier and TypeMethod and Description
public void
process(final HttpRequest
the request to process
request
,
final EntityDetails
the request entity details or null if not available
entity
,
final HttpContext
the context for the request
context
)

Implements org.apache.hc.core5.http.HttpRequestInterceptor.process.

Processes a request.
public void
process(final HttpResponse
the response to process
response
,
final EntityDetails
the request entity details or null if not available
entity
,
final HttpContext
the context for the request
context
)

Implements org.apache.hc.core5.http.HttpResponseInterceptor.process.

Processes a response.
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

requestInterceptorsback to summary
private final HttpRequestInterceptor[] requestInterceptors
responseInterceptorsback to summary
private final HttpResponseInterceptor[] responseInterceptors

Constructor Detail

DefaultHttpProcessorback to summary
public DefaultHttpProcessor(final HttpRequestInterceptor[] requestInterceptors, final HttpResponseInterceptor[] responseInterceptors)
DefaultHttpProcessorback to summary
public DefaultHttpProcessor(final List<HttpRequestInterceptor> requestInterceptors, final List<HttpResponseInterceptor> responseInterceptors)
Since
4.3
DefaultHttpProcessorback to summary
public DefaultHttpProcessor(final HttpRequestInterceptor... requestInterceptors)
DefaultHttpProcessorback to summary
public DefaultHttpProcessor(final HttpResponseInterceptor... responseInterceptors)

Method Detail

processback to summary
public void process(final HttpRequest request, final EntityDetails entity, final HttpContext context) throws IOException, HttpException

Implements org.apache.hc.core5.http.HttpRequestInterceptor.process.

Doc from org.apache.hc.core5.http.HttpRequestInterceptor.process.

Processes a request. On the client side, this step is performed before the request is sent to the server. On the server side, this step is performed on incoming messages before the message body is evaluated.

Parameters
request:HttpRequest

the request to process

entity:EntityDetails

the request entity details or null if not available

context:HttpContext

the context for the request

Annotations
@Override
Exceptions
IOException:
in case of an I/O error
HttpException:
in case of an HTTP protocol violation
processback to summary
public void process(final HttpResponse response, final EntityDetails entity, final HttpContext context) throws IOException, HttpException

Implements org.apache.hc.core5.http.HttpResponseInterceptor.process.

Doc from org.apache.hc.core5.http.HttpResponseInterceptor.process.

Processes a response. On the server side, this step is performed before the response is sent to the client. On the client side, this step is performed on incoming messages before the message body is evaluated.

Parameters
response:HttpResponse

the response to process

entity:EntityDetails

the request entity details or null if not available

context:HttpContext

the context for the request

Annotations
@Override
Exceptions
IOException:
in case of an I/O error
HttpException:
in case of an HTTP protocol violation