List of usage examples for org.apache.http.protocol HttpService setExpectationVerifier
@Deprecated
public void setExpectationVerifier(HttpExpectationVerifier httpExpectationVerifier)
From source file:com.android.unit_tests.TestHttpServer.java
public void start() { if (this.listener != null) { throw new IllegalStateException("Listener already running"); }/*from w ww .jav a2s. c o m*/ this.listener = new Thread(new Runnable() { public void run() { while (!shutdown && !Thread.interrupted()) { try { // Set up HTTP connection HttpServerConnection conn = acceptConnection(); // Set up the HTTP service HttpService httpService = new HttpService(httpproc, connStrategy, responseFactory); httpService.setParams(params); httpService.setExpectationVerifier(expectationVerifier); httpService.setHandlerResolver(reqistry); // Start worker thread Thread t = new WorkerThread(httpService, conn); t.setDaemon(true); t.start(); } catch (InterruptedIOException ex) { break; } catch (IOException e) { break; } } } }); this.listener.start(); }