/** * Construct a new instance. * * @param configurable the configurable to delegate configuration requests to * @param conduit the initial conduit to use for data transport */ public ConduitStreamSinkChannel( final Configurable configurable, final StreamSinkConduit conduit) { this.configurable = configurable; this.conduit = conduit; conduit.setWriteReadyHandler( new WriteReadyHandler.ChannelListenerHandler<ConduitStreamSinkChannel>(this)); }
public void shutdownWrites() throws IOException { conduit.terminateWrites(); }
public boolean flush() throws IOException { return conduit.flush(); }
public long write(final ByteBuffer[] dsts, final int offs, final int len) throws IOException { return conduit.write(dsts, offs, len); }
public long write(final ByteBuffer[] srcs) throws IOException { return conduit.write(srcs, 0, srcs.length); }
@Override public long writeFinal(ByteBuffer[] srcs, int offset, int length) throws IOException { return conduit.writeFinal(srcs, offset, length); }
public XnioWorker getWorker() { return conduit.getWorker(); }
@Deprecated public XnioExecutor getWriteThread() { return conduit.getWriteThread(); }
public void awaitWritable(final long time, final TimeUnit timeUnit) throws IOException { conduit.awaitWritable(time, timeUnit); }
public void awaitWritable() throws IOException { conduit.awaitWritable(); }
public boolean isWriteResumed() { return conduit.isWriteResumed(); }
public void wakeupWrites() { conduit.wakeupWrites(); }
public void resumeWrites() { conduit.resumeWrites(); }
public void suspendWrites() { conduit.suspendWrites(); }
@Override public long writeFinal(ByteBuffer[] srcs) throws IOException { return conduit.writeFinal(srcs, 0, srcs.length); }
public boolean isOpen() { return !conduit.isWriteShutdown(); }
public void close() throws IOException { conduit.truncateWrites(); }
public long transferFrom(final FileChannel src, final long position, final long count) throws IOException { return conduit.transferFrom(src, position, count); }
public XnioIoThread getIoThread() { return conduit.getWriteThread(); }
public long transferFrom( final StreamSourceChannel source, final long count, final ByteBuffer throughBuffer) throws IOException { return conduit.transferFrom(source, count, throughBuffer); }
public int write(final ByteBuffer dst) throws IOException { return conduit.write(dst); }
@Override public int writeFinal(ByteBuffer src) throws IOException { return conduit.writeFinal(src); }