private void checkRemoteEndpointQueue(final Exchange exchange) { // 0 = empty queue | 1 = response | 2 = request if (!getRemoteEndpoint(exchange).getConfirmableQueue().isEmpty()) { // We have some exchanges that need to be processed; is it a // response or a request? Exchange queuedExchange = getRemoteEndpoint(exchange).getConfirmableQueue().poll(); if (queuedExchange.getCurrentResponse() != null) { // it's a response sendResponse(queuedExchange, queuedExchange.getCurrentResponse()); } else if (queuedExchange.getCurrentRequest() != null) { // it's a request sendRequest(queuedExchange, queuedExchange.getCurrentRequest()); } } }
private void checkRemoteEndpointQueue(Exchange exchange) { // 0 = empty queue | 1 = response | 2 = request if (!getRemoteEndpoint(exchange).getConfirmableQueue().isEmpty()) { // We have some exchanges that need to be processed; is it a // response or a request? Exchange queuedExchange = getRemoteEndpoint(exchange).getConfirmableQueue().poll(); if (queuedExchange.getCurrentResponse() != null) { // it's a response sendResponse(queuedExchange, queuedExchange.getCurrentResponse()); } else if (queuedExchange.getCurrentRequest() != null) { // it's a request sendRequest(queuedExchange, queuedExchange.getCurrentRequest()); } } }
if (getRemoteEndpoint(exchange).getConfirmableQueue().size() == EXCHANGELIMIT) { getRemoteEndpoint(exchange).getConfirmableQueue().add(exchange);
if (getRemoteEndpoint(exchange).getConfirmableQueue().size() == EXCHANGELIMIT) { getRemoteEndpoint(exchange).getConfirmableQueue().add(exchange);