protected void sendTheMessage(final RouteMessage rm, final NodeHandle handle) { if (logger.level <= Logger.FINER) logger.log("sendTheMessage(" + rm + "," + handle + ")"); rm.setTLCancellable( thePastryNode.send( handle, rm, new PMessageNotification() { public void sent(PMessageReceipt msg) { rm.sendSuccess(handle); } public void sendFailed(PMessageReceipt msg, Exception reason) { if (rm.sendFailed(reason)) { if (logger.level <= Logger.CONFIG) logger.logException("sendFailed(" + rm + ")=>" + handle, reason); } else { if (logger.level <= Logger.FINE) { logger.logException("sendFailed(" + rm + ")=>" + handle, reason); } else { if (reason instanceof NodeIsFaultyException) { if (logger.level <= Logger.INFO) logger.log("sendFailed(" + rm + ")=>" + handle + " " + reason); } else { if (logger.level <= Logger.WARNING) logger.logException("sendFailed(" + rm + ")=>" + handle, reason); } } } } }, rm.getTLOptions())); }