ResponseHandler implements IResponseHandler { public void onResponse(IHttpResponse response) throws IOException { status = response.getStatus(); ... } public void void onException(IOException ioe) { ... } }
222223224225226227228229230231232
try { requestHeader.setAttribute(RETRY_COUNT_KEY, ++countTrials); requestHeader.setAttribute(CookieHandler.COOKIE_WARNING_KEY, false); IHttpResponseHandler respHdl = new IHttpResponseHandler() { @Execution(Execution.NONTHREADED) public void onResponse(IHttpResponse response) throws IOException { exchange.send(response); }
388389390391392393394395396397398
655656657658659660661662663664665
public void onRequest(final IHttpExchange exchange) throws IOException { countOnRequestCalled++; onRequestThreadname = Thread.currentThread().getName(); IHttpResponseHandler respHdl = new IHttpResponseHandler() { public void onResponse(IHttpResponse response) throws IOException { exchange.send(response); }
693694695696697698699700701702703
public void onRequest(final IHttpExchange exchange) throws IOException { countOnRequestCalled++; onRequestThreadname.set(Thread.currentThread().getName()); IHttpResponseHandler respHdl = new IHttpResponseHandler() { public void onResponse(IHttpResponse response) throws IOException { exchange.send(response); }
727728729730731732733734735736737
public void onRequest(final IHttpExchange exchange) throws IOException { this.request = exchange.getRequest(); this.onRequestThreadname = Thread.currentThread().getName(); IHttpResponseHandler respHdl = new IHttpResponseHandler() { public void onResponse(IHttpResponse response) throws IOException { exchange.send(response); }
759760761762763764765766767768769
@InvokeOn(InvokeOn.MESSAGE_RECEIVED) public void onRequest(final IHttpExchange exchange) throws IOException { this.request = exchange.getRequest(); this.onRequestThreadname = Thread.currentThread().getName(); IHttpResponseHandler respHdl = new IHttpResponseHandler() { public void onResponse(IHttpResponse response) throws IOException { exchange.send(response); }
790791792793794795796797798799800
private boolean onResponseCalled = false; public void onRequest(final IHttpExchange exchange) throws IOException { IHttpResponseHandler respHdl = new IHttpResponseHandler() { public void onResponse(IHttpResponse response) throws IOException { onResponseCalled = true; exchange.send(response); }
619620621622623624625626627628629
requestCopy.setHeader("If-Modified-Since", response.getHeader("Last-Modified")); } requestCopy.setAttribute(CacheHandler.SKIP_CACHE_HANDLING, "true"); IHttpResponseHandler respHdl = new IHttpResponseHandler() { @Execution(Execution.NONTHREADED) @InvokeOn(InvokeOn.MESSAGE_RECEIVED) public void onResponse(IHttpResponse response) throws IOException {
150151152153154155156157158159160
try { request.setAttribute(COUNT_REDIRECTS_KEY, ++countRedirects); request.setAttribute(CookieHandler.COOKIE_WARNING_KEY, false); IHttpResponseHandler respHdl = new IHttpResponseHandler() { @Execution(Execution.NONTHREADED) public void onResponse(IHttpResponse response) throws IOException { exchange.send(response); }
256257258259260261262263264265266
connection.close(); return true; } IHttpResponseHandler respHdl = new IHttpResponseHandler() { public void onResponse(IHttpResponse response) throws IOException { exchange.send(response); }