Home » HttpComponents-Core-4.0.1 » org.apache.http.protocol » [javadoc | source]
org.apache.http.protocol
public class: HttpService [javadoc | source]
java.lang.Object
   org.apache.http.protocol.HttpService
HttpService is a server side HTTP protocol handler based in the blocking I/O model that implements the essential requirements of the HTTP protocol for the server side message processing as described by RFC 2616.
HttpService relies on HttpProcessor to generate mandatory protocol headers for all outgoing messages and apply common, cross-cutting message transformations to all incoming and outgoing messages, whereas individual HttpRequestHandler s are expected to take care of application specific content generation and processing.
HttpService relies on HttpRequestHandler to resolve matching request handler for a particular request URI of an incoming HTTP request.
HttpService can use optional HttpExpectationVerifier to ensure that incoming requests meet server's expectations.
Constructor:
 public HttpService(HttpProcessor proc,
    ConnectionReuseStrategy connStrategy,
    HttpResponseFactory responseFactory) 
    Create a new HTTP service.
    Parameters:
    proc - the processor to use on requests and responses
    connStrategy - the connection reuse strategy
    responseFactory - the response factory
Method from org.apache.http.protocol.HttpService Summary:
doService,   getParams,   handleException,   handleRequest,   setConnReuseStrategy,   setExpectationVerifier,   setHandlerResolver,   setHttpProcessor,   setParams,   setResponseFactory
Methods from java.lang.Object:
clone,   equals,   finalize,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from org.apache.http.protocol.HttpService Detail:
 protected  void doService(HttpRequest request,
    HttpResponse response,
    HttpContext context) throws HttpException, IOException 
 public HttpParams getParams() 
 protected  void handleException(HttpException ex,
    HttpResponse response) 
    Handles the given exception and generates an HTTP response to be sent back to the client to inform about the exceptional condition encountered in the course of the request processing.
 public  void handleRequest(HttpServerConnection conn,
    HttpContext context) throws IOException, HttpException 
    Handles receives one HTTP request over the given connection within the given execution context and sends a response back to the client.
 public  void setConnReuseStrategy(ConnectionReuseStrategy connStrategy) 
 public  void setExpectationVerifier(HttpExpectationVerifier expectationVerifier) 
 public  void setHandlerResolver(HttpRequestHandlerResolver handlerResolver) 
 public  void setHttpProcessor(HttpProcessor processor) 
 public  void setParams(HttpParams params) 
 public  void setResponseFactory(HttpResponseFactory responseFactory)