private void completeExchange(Exchange exchange) { getConduitSelector().complete(exchange); }
private void completeExchange(Exchange exchange) { getConduitSelector().complete(exchange); }
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); } }
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); } }
public void onMessage(Message message) { Exception ex = message.getContent(Exception.class); if (ex != null) { getConduitSelector().complete(message.getExchange()); if (message.getContent(Exception.class) == null) { // handle the right response List<Object> resList = null; Message inMsg = message.getExchange().getInMessage(); Map<String, Object> ctx = responseContext.get(Thread.currentThread()); resList = CastUtils.cast(inMsg.getContent(List.class)); Object[] result = resList == null ? null : resList.toArray(); callback.handleResponse(ctx, result); return; } } outFaultObserver.onMessage(message); } });
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); } }
public void onMessage(Message message) { Exception ex = message.getContent(Exception.class); if (ex != null) { getConduitSelector().complete(message.getExchange()); if (message.getContent(Exception.class) == null) { // handle the right response List<Object> resList = null; Message inMsg = message.getExchange().getInMessage(); Map<String, Object> ctx = responseContext.get(Thread.currentThread()); resList = CastUtils.cast(inMsg.getContent(List.class)); Object[] result = resList == null ? null : resList.toArray(); callback.handleResponse(ctx, result); return; } } outFaultObserver.onMessage(message); } });
protected Object[] preProcessResult(Message message) throws Exception { Exchange exchange = message.getExchange(); Exception ex = message.getContent(Exception.class); if (ex != null || PropertyUtils.isTrue(exchange.get(SERVICE_NOT_AVAIL_PROPERTY)) && PropertyUtils.isTrue(exchange.get(COMPLETE_IF_SERVICE_NOT_AVAIL_PROPERTY))) { getConfiguration().getConduitSelector().complete(exchange); } if (ex != null) { checkClientException(message, ex); } checkClientException(message, exchange.get(Exception.class)); List<?> result = exchange.get(List.class); return result != null ? result.toArray() : null; }
conduitSelector.complete(cxfExchange); ex = cxfExchange.getOutMessage().getContent(Exception.class); if (ex == null && cxfExchange.getInMessage() != null) {
protected Object[] preProcessResult(Message message) throws Exception { Exchange exchange = message.getExchange(); Exception ex = message.getContent(Exception.class); if (ex == null) { ex = message.getExchange().get(Exception.class); } if (ex == null && !exchange.isOneWay()) { synchronized (exchange) { while (exchange.get("IN_CHAIN_COMPLETE") == null) { exchange.wait(cfg.getSynchronousTimeout()); } } } if (ex == null) { ex = message.getContent(Exception.class); } if (ex != null || PropertyUtils.isTrue(exchange.get(SERVICE_NOT_AVAIL_PROPERTY)) && PropertyUtils.isTrue(exchange.get(COMPLETE_IF_SERVICE_NOT_AVAIL_PROPERTY))) { getConfiguration().getConduitSelector().complete(exchange); } if (ex != null) { checkClientException(message, ex); } checkClientException(message, exchange.get(Exception.class)); List<?> result = exchange.get(List.class); return result != null ? result.toArray() : null; }
protected Object[] preProcessResult(Message message) throws Exception { Exchange exchange = message.getExchange(); Exception ex = message.getContent(Exception.class); if (ex == null) { ex = message.getExchange().get(Exception.class); } if (ex == null && !exchange.isOneWay()) { synchronized (exchange) { while (exchange.get("IN_CHAIN_COMPLETE") == null) { exchange.wait(cfg.getSynchronousTimeout()); } } } if (ex == null) { ex = message.getContent(Exception.class); } if (ex != null || PropertyUtils.isTrue(exchange.get(SERVICE_NOT_AVAIL_PROPERTY)) && PropertyUtils.isTrue(exchange.get(COMPLETE_IF_SERVICE_NOT_AVAIL_PROPERTY))) { getConfiguration().getConduitSelector().complete(exchange); } if (ex != null) { checkClientException(message, ex); } checkClientException(message, exchange.get(Exception.class)); List<?> result = exchange.get(List.class); return result != null ? result.toArray() : null; }
if (callback != null) { if (callback.isCancelled()) { getConduitSelector().complete(message.getExchange()); return;
if (callback != null) { if (callback.isCancelled()) { getConduitSelector().complete(message.getExchange()); return;