ResponseHandler implements IResponseHandler { public void onResponse(IHttpResponse response) throws IOException { status = response.getStatus(); ... } public void void onException(IOException ioe) { ... } }
540541542543544545546547548549550
request.removeHeader("Authorization"); request.setHeader("X-Authentication", authtoken); IHttpResponseHandler respHdl = new IHttpResponseHandler() { public void onResponse(IHttpResponse response) throws IOException { exchange.send(response); }
360361362363364365366367368369370
tunnel.setBodyDataReceiveTimeoutMillis(httpClient.getBodyDataReceiveTimeoutMillis()); tunnel.setAutocloseAfterResponse(true); IHttpResponseHandler respHdl = new IHttpResponseHandler() { public void onResponse(IHttpResponse response) throws IOException { HttpClientConnection.addConnectionAttribute(response.getResponseHeader(), tunnel); exchange.send(response); }
364365366367368369370371372373374
try { getRequestHeader().setAttribute(COUNT_REDIRECTS_KEY, incCountRedirect()); getRequestHeader().setAttribute(CookieHandler.COOKIE_WARNING_KEY, false); IHttpResponseHandler respHdl = new IHttpResponseHandler() { @Execution(Execution.NONTHREADED) public void onResponse(IHttpResponse response) throws IOException { getExchange().send(response); }
423424425426427428429430431432433
} try { getRequestHeader().setAttribute(COUNT_REDIRECTS_KEY, incCountRedirect()); getRequestHeader().setAttribute(CookieHandler.COOKIE_WARNING_KEY, false); IHttpResponseHandler respHdl = new IHttpResponseHandler() { @Execution(Execution.NONTHREADED) public void onResponse(IHttpResponse response) throws IOException { getExchange().send(response); }
289290291292293294295296297298299
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 { if (LOG.isLoggable(Level.FINE)) { LOG.fine("forward response");
407408409410411412413414415416417
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); }
5758596061626364656667
HttpServer server = new HttpServer(hdl); server.start(); HttpClientConnection con = new HttpClientConnection("localhost", server.getLocalPort()); IHttpResponseHandler resHdl = new IHttpResponseHandler() { public void onResponse(IHttpResponse response) throws IOException { } public void onException(IOException ioe) {
919293949596979899100101
122123124125126127128129130131132
226227228229230231232233234235236