protected void waitForResponseCode(Exchange exchange) { synchronized (exchange) { if (getResponseCode(exchange) == null) { try { exchange.wait(cfg.getSynchronousTimeout()); } catch (InterruptedException ex) { // ignore } } else { return; } } if (getResponseCode(exchange) == null) { throw new ProcessingException("Response timeout"); } }
protected void waitForResponseCode(Exchange exchange) { synchronized (exchange) { if (getResponseCode(exchange) == null) { try { exchange.wait(cfg.getSynchronousTimeout()); } catch (InterruptedException ex) { // ignore } } else { return; } } if (getResponseCode(exchange) == null) { throw new ProcessingException("Response timeout"); } }
protected void waitForResponseCode(Exchange exchange) { synchronized (exchange) { if (getResponseCode(exchange) == null) { try { exchange.wait(cfg.getSynchronousTimeout()); } catch (InterruptedException ex) { // ignore } } else { return; } } if (getResponseCode(exchange) == null) { throw new ClientException("Response timeout"); } }
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; }