@Override public void close() throws InterruptedException { first.close(); if (needFlush) { pendingData = true; if (!runningTask) { execute(this); } } }
public boolean unsetupPipe(Channel in, Channel out) { for (Iterator itr = getPipes().iterator(); itr.hasNext(); ) { Pipe tmp = (Pipe) itr.next(); if (tmp.equals(in, out)) { tmp.close(); getPipes().remove(tmp); return true; } } return false; }