@Override public void run() { if (!endpoint.getNonConfirmableQueue().isEmpty()) { endpoint.setProcessingNON(true); Exchange exchange = endpoint.getNonConfirmableQueue().poll(); if (getRemoteEndpoint(exchange).getNonConfirmableCounter() <= MAX_SUCCESSIVE_NONS) { getRemoteEndpoint(exchange).increaseNonConfirmableCounter(); if (exchange.getCurrentRequest().getDestinationPort() != 0) { // it's a response sendBucketRequest(exchange, exchange.getCurrentRequest()); } else if (exchange.getCurrentResponse() != null) { // it's a request sendBucketResponse(exchange, exchange.getCurrentResponse()); } } // schedule next transmission of a NON based on the RTO value (rate = 1/RTO) executor.schedule( new BucketThread(getRemoteEndpoint(exchange)), getRemoteEndpoint(exchange).getRTO(), TimeUnit.MILLISECONDS); } else { endpoint.setProcessingNON(false); } } }
@Override public void run() { if (!endpoint.getNonConfirmableQueue().isEmpty()) { endpoint.setProcessingNON(true); Exchange exchange = endpoint.getNonConfirmableQueue().poll(); if (getRemoteEndpoint(exchange).getNonConfirmableCounter() <= MAX_SUCCESSIVE_NONS) { getRemoteEndpoint(exchange).increaseNonConfirmableCounter(); if (exchange.getCurrentRequest().getDestinationPort() != 0) { // it's a response sendBucketRequest(exchange, exchange.getCurrentRequest()); } else if (exchange.getCurrentResponse() != null) { // it's a request sendBucketResponse(exchange, exchange.getCurrentResponse()); } } // schedule next transmission of a NON based on the RTO value (rate = 1/RTO) executor.schedule( new bucketThread(getRemoteEndpoint(exchange)), getRemoteEndpoint(exchange).getRTO(), TimeUnit.MILLISECONDS); } else { endpoint.setProcessingNON(false); } } }
} else if (getRemoteEndpoint(exchange).getNonConfirmableCounter() > MAX_SUCCESSIVE_NONS) {
} else if (getRemoteEndpoint(exchange).getNonConfirmableCounter() > MAX_SUCCESSIVE_NONS) {