Example usage for org.apache.http.impl.bootstrap ServerBootstrap bootstrap

List of usage examples for org.apache.http.impl.bootstrap ServerBootstrap bootstrap

Introduction

In this page you can find the example usage for org.apache.http.impl.bootstrap ServerBootstrap bootstrap.

Prototype

public static ServerBootstrap bootstrap() 

Source Link

Usage

From source file:org.apache.http.testserver.HttpServer.java

public void start() throws IOException {
    Asserts.check(this.server == null, "Server already running");
    this.server = ServerBootstrap.bootstrap()
            .setSocketConfig(SocketConfig.custom().setSoTimeout(this.timeout).build())
            .setServerInfo("TEST-SERVER/1.1").setConnectionFactory(new LoggingConnFactory())
            .setExceptionLogger(new SimpleExceptionLogger()).setExpectationVerifier(this.expectationVerifier)
            .setHandlerMapper(this.reqistry).create();
    this.server.start();
}