Package org.apache.http.protocol
Class HttpService
java.lang.Object
org.apache.http.protocol.HttpService
public class HttpService extends Object
Minimalistic server-side implementation of an HTTP processor.
- Version:
- $Revision: 610763 $
- Author:
- Oleg Kalnichevski
-
Constructor Summary
Constructors Constructor Description HttpService(HttpProcessor proc, ConnectionReuseStrategy connStrategy, HttpResponseFactory responseFactory)Create a new HTTP service. -
Method Summary
Modifier and Type Method Description protected voiddoService(HttpRequest request, HttpResponse response, HttpContext context)HttpParamsgetParams()protected voidhandleException(HttpException ex, HttpResponse response)voidhandleRequest(HttpServerConnection conn, HttpContext context)voidsetConnReuseStrategy(ConnectionReuseStrategy connStrategy)voidsetExpectationVerifier(HttpExpectationVerifier expectationVerifier)voidsetHandlerResolver(HttpRequestHandlerResolver handlerResolver)voidsetHttpProcessor(HttpProcessor processor)voidsetParams(HttpParams params)voidsetResponseFactory(HttpResponseFactory responseFactory)
-
Constructor Details
-
HttpService
public HttpService(HttpProcessor proc, ConnectionReuseStrategy connStrategy, HttpResponseFactory responseFactory)Create a new HTTP service.- Parameters:
proc- the processor to use on requests and responsesconnStrategy- the connection reuse strategyresponseFactory- the response factory
-
-
Method Details
-
setHttpProcessor
-
setConnReuseStrategy
-
setResponseFactory
-
setHandlerResolver
-
setExpectationVerifier
-
getParams
-
setParams
-
handleRequest
public void handleRequest(HttpServerConnection conn, HttpContext context) throws IOException, HttpException- Throws:
IOExceptionHttpException
-
handleException
-
doService
protected void doService(HttpRequest request, HttpResponse response, HttpContext context) throws HttpException, IOException- Throws:
HttpExceptionIOException
-