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

public Class ResponseServer

extends Object
implements HttpResponseInterceptor
Class Inheritance
All Implemented Interfaces
org.apache.http.HttpResponseInterceptor
Annotations
@Contract
threading:IMMUTABLE
Imports
java.io.IOException, org.apache.http.HttpException, .HttpResponse, .HttpResponseInterceptor, org.apache.http.annotation.ThreadingBehavior, .Contract, org.apache.http.util.Args

ResponseServer is responsible for adding Server header. This interceptor is recommended for server side protocol processors.
Since
4.0

Field Summary

Modifier and TypeField and Description
private final String

Constructor Summary

AccessConstructor and Description
public
ResponseServer(final String originServer)

public

Method Summary

Modifier and TypeMethod and Description
public void
process(final HttpResponse
the response to postprocess
response
,
final HttpContext
the context for the request
context
)

Implements org.apache.http.HttpResponseInterceptor.process.

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

Field Detail

originServerback to summary
private final String originServer

Constructor Detail

ResponseServerback to summary
public ResponseServer(final String originServer)
Since
4.3
ResponseServerback to summary
public ResponseServer()

Method Detail

processback to summary
public void process(final HttpResponse response, final HttpContext context) throws HttpException, IOException

Implements org.apache.http.HttpResponseInterceptor.process.

Doc from org.apache.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 postprocess

context:HttpContext

the context for the request

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