/** * If we are interrupted after we are cancelled, return <code>true</code> indicating that there is * a "response". That way, we won't complain about timing out. However, the response is still * <code>null</code>. * * <p>Otherwise, re-throw the <code>InterruptedException</code>. */ protected boolean handleInterruption(InterruptedException ie, long msecsRemaining) throws InterruptedException, ReplyException { if (Thread.interrupted()) throw new InterruptedException(); if (this.isCancelled) { return true; } else { throw ie; } }
/** * Since we can't override <code>waitForReplies</code>, we have to get the thread that is waiting * in <code>preWait</code>. */ @Override protected void preWait() { this.thread = Thread.currentThread(); super.preWait(); }