/** * @param out The out to set. */ public void setOutput(ByteBuffer out) { _out = out; getWriteFlusher().completeWrite(); }
/** * @param out The out to set. */ public void setOutput(ByteBuffer out) { _out = out; getWriteFlusher().completeWrite(); }
/** * @param out The out to set. */ public void setOutput(ByteBuffer out) { _out = out; getWriteFlusher().completeWrite(); }
/** * @param out The out to set. */ public void setOutput(ByteBuffer out) { _out = out; getWriteFlusher().completeWrite(); }
/** * @return Returns the out. */ public ByteBuffer takeOutput() { ByteBuffer b=_out; _out=BufferUtil.allocate(b.capacity()); getWriteFlusher().completeWrite(); return b; }
/** * @return Returns the out. */ public ByteBuffer takeOutput() { ByteBuffer b=_out; _out=BufferUtil.allocate(b.capacity()); getWriteFlusher().completeWrite(); return b; }
/** * @return Returns the out. */ public ByteBuffer takeOutput() { ByteBuffer b=_out; _out=BufferUtil.allocate(b.capacity()); getWriteFlusher().completeWrite(); return b; }
/** * @return Returns the out. */ public ByteBuffer takeOutput() { ByteBuffer b=_out; _out=BufferUtil.allocate(b.capacity()); getWriteFlusher().completeWrite(); return b; }
/** * @param out The out to set. */ public void setOutput(ByteBuffer out) { try(Locker.Lock lock = _locker.lock()) { _out = out; } getWriteFlusher().completeWrite(); }
/** * @param out The out to set. */ public void setOutput(ByteBuffer out) { try(Locker.Lock lock = _locker.lock()) { _out = out; } getWriteFlusher().completeWrite(); }
/** * @return Returns the out. */ public ByteBuffer takeOutput() { ByteBuffer b; try(Locker.Lock lock = _locker.lock()) { b=_out; _out=BufferUtil.allocate(b.capacity()); } getWriteFlusher().completeWrite(); return b; }
/** * @return Returns the out. */ public ByteBuffer takeOutput() { ByteBuffer b; try(Locker.Lock lock = _locker.lock()) { b=_out; _out=BufferUtil.allocate(b.capacity()); } getWriteFlusher().completeWrite(); return b; }
/** * */ public void reset() { getFillInterest().onClose(); getWriteFlusher().onClose(); _ishut=false; _oshut=false; _closed=false; _inQ.clear(); BufferUtil.clear(_out); }
/** Wait for some output * @param time Time to wait * @param unit Units for time to wait * @return The buffer of output * @throws InterruptedException if interrupted */ public ByteBuffer waitForOutput(long time,TimeUnit unit) throws InterruptedException { ByteBuffer b; try(Locker.Lock lock = _locker.lock()) { while (BufferUtil.isEmpty(_out) && !isOutputShutdown()) { if (!_hasOutput.await(time,unit)) return null; } b=_out; _out=BufferUtil.allocate(b.capacity()); } getWriteFlusher().completeWrite(); return b; }
/** * */ public void reset() { getFillInterest().onClose(); getWriteFlusher().onClose(); _ishut=false; _oshut=false; _closed=false; _in=null; BufferUtil.clear(_out); }
/** Wait for some output * @param time Time to wait * @param unit Units for time to wait * @return The buffer of output * @throws InterruptedException if interrupted */ public ByteBuffer waitForOutput(long time,TimeUnit unit) throws InterruptedException { ByteBuffer b; try(Locker.Lock lock = _locker.lock()) { while (BufferUtil.isEmpty(_out) && !isOutputShutdown()) { if (!_hasOutput.await(time,unit)) return null; } b=_out; _out=BufferUtil.allocate(b.capacity()); } getWriteFlusher().completeWrite(); return b; }
/** * */ public void reset() { getFillInterest().onClose(); getWriteFlusher().onClose(); _ishut=false; _oshut=false; _closed=false; _in=null; BufferUtil.clear(_out); }
/** * */ public void reset() { getFillInterest().onClose(); getWriteFlusher().onClose(); _ishut=false; _oshut=false; _closed=false; _in=null; BufferUtil.clear(_out); }