protected void completeExchange(Exchange exchange, boolean proxy) { // higher level conduits such as FailoverTargetSelector need to // clear the request state but a fair number of response objects // depend on InputStream being still open thus lower-level conduits // operating on InputStream don't have to close streams pro-actively exchange.put(KEEP_CONDUIT_ALIVE, true); getConfiguration().getConduitSelector().complete(exchange); String s = (String)exchange.getOutMessage().get(Message.BASE_PATH); if (s != null && !state.getBaseURI().toString().equals(s)) { // usually the (failover) conduit change will result in a retry call // which in turn will reset the base and current request URI. // In some cases, such as the "upfront" load-balancing, etc, the retries // won't be executed so it is necessary to reset the base address calculateNewRequestURI(URI.create(s), getCurrentURI(), proxy); return; } s = (String)exchange.getOutMessage().get("transport.retransmit.url"); if (s != null && !state.getBaseURI().toString().equals(s)) { calculateNewRequestURI(URI.create(s), getCurrentURI(), proxy); } }
protected void completeExchange(Exchange exchange, boolean proxy) { // higher level conduits such as FailoverTargetSelector need to // clear the request state but a fair number of response objects // depend on InputStream being still open thus lower-level conduits // operating on InputStream don't have to close streams pro-actively exchange.put(KEEP_CONDUIT_ALIVE, true); getConfiguration().getConduitSelector().complete(exchange); String s = (String)exchange.getOutMessage().get(Message.BASE_PATH); if (s != null && !state.getBaseURI().toString().equals(s)) { // usually the (failover) conduit change will result in a retry call // which in turn will reset the base and current request URI. // In some cases, such as the "upfront" load-balancing, etc, the retries // won't be executed so it is necessary to reset the base address calculateNewRequestURI(URI.create(s), getCurrentURI(), proxy); return; } s = (String)exchange.getOutMessage().get("transport.retransmit.url"); if (s != null && !state.getBaseURI().toString().equals(s)) { calculateNewRequestURI(URI.create(s), getCurrentURI(), proxy); } }
protected void completeExchange(Object response, Exchange exchange, boolean proxy) { // higher level conduits such as FailoverTargetSelector need to // clear the request state but a fair number of response objects // depend on InputStream being still open thus lower-level conduits // operating on InputStream don't have to close streams pro-actively exchange.put(KEEP_CONDUIT_ALIVE, true); getConfiguration().getConduitSelector().complete(exchange); String s = (String)exchange.getOutMessage().get(Message.BASE_PATH); if (s != null && !state.getBaseURI().toString().equals(s)) { // usually the (failover) conduit change will result in a retry call // which in turn will reset the base and current request URI. // In some cases, such as the "upfront" load-balancing, etc, the retries // won't be executed so it is necessary to reset the base address calculateNewRequestURI(URI.create(s), getCurrentURI(), proxy); } }