Example usage for org.apache.http.protocol HttpService HttpService

List of usage examples for org.apache.http.protocol HttpService HttpService

Introduction

In this page you can find the example usage for org.apache.http.protocol HttpService HttpService.

Prototype

@Deprecated
    public HttpService(HttpProcessor httpProcessor, ConnectionReuseStrategy connectionReuseStrategy,
            HttpResponseFactory httpResponseFactory, HttpRequestHandlerResolver httpRequestHandlerResolver,
            HttpExpectationVerifier httpExpectationVerifier, HttpParams httpParams) 

Source Link

Usage

From source file:org.apache.camel.itest.http.HttpTestServer.java

/**
 * Creates a new test server.//  ww w.jav a 2 s  .  c o m
 *
 * @param proc      the HTTP processors to be used by the server, or
 *                  <code>null</code> to use a
 *                  {@link #newProcessor default} processor
 * @param reuseStrat the connection reuse strategy to be used by the
 *                  server, or <code>null</code> to use
 *                  {@link #newConnectionReuseStrategy() default}
 *                  strategy.
 * @param params    the parameters to be used by the server, or
 *                  <code>null</code> to use
 *                  {@link #newDefaultParams default} parameters
 * @param sslcontext optional SSL context if the server is to leverage
 *                   SSL/TLS transport security
 */
public HttpTestServer(final BasicHttpProcessor proc, final ConnectionReuseStrategy reuseStrat,
        final HttpResponseFactory responseFactory, final HttpExpectationVerifier expectationVerifier,
        final HttpParams params, final SSLContext sslcontext) {
    this.handlerRegistry = new HttpRequestHandlerRegistry();
    this.workers = Collections.synchronizedSet(new HashSet<Worker>());
    this.httpservice = new HttpService(proc != null ? proc : newProcessor(),
            reuseStrat != null ? reuseStrat : newConnectionReuseStrategy(),
            responseFactory != null ? responseFactory : newHttpResponseFactory(), handlerRegistry,
            expectationVerifier, params != null ? params : newDefaultParams());
    this.sslcontext = sslcontext;
}