public abstract class DelegatingStreamSinkChannel<T extends DelegatingStreamSinkChannel> extends Object implements org.xnio.channels.StreamSinkChannel
Modifier and Type | Field and Description |
---|---|
protected org.xnio.ChannelListener.SimpleSetter<T> | closeSetter |
protected org.xnio.channels.StreamSinkChannel | delegate |
protected org.xnio.ChannelListener.SimpleSetter<T> | writeSetter |
Constructor and Description |
---|
DelegatingStreamSinkChannel(org.xnio.channels.StreamSinkChannel delegate) |
Modifier and Type | Method and Description |
---|---|
void | awaitWritable() |
void | awaitWritable(long time, TimeUnit timeUnit) |
void | close() |
boolean | flush() |
org.xnio.ChannelListener.Setter<? extends org.xnio.channels.StreamSinkChannel> | getCloseSetter() |
org.xnio.XnioIoThread | getIoThread() |
<T> T | getOption(org.xnio.Option<T> option) |
org.xnio.XnioWorker | getWorker() |
org.xnio.ChannelListener.Setter<? extends org.xnio.channels.StreamSinkChannel> | getWriteSetter() |
org.xnio.XnioExecutor | getWriteThread() |
boolean | isOpen() |
boolean | isWriteResumed() |
void | resumeWrites() |
<T> T | setOption(org.xnio.Option<T> option, T value) |
void | shutdownWrites() |
boolean | supportsOption(org.xnio.Option<?> option) |
void | suspendWrites() |
long | transferFrom(FileChannel src, long position, long count) |
long | transferFrom(org.xnio.channels.StreamSourceChannel source, long count, ByteBuffer throughBuffer) |
void | wakeupWrites() |
int | write(ByteBuffer src) |
long | write(ByteBuffer[] srcs) |
long | write(ByteBuffer[] srcs, int offset, int length) |
int | writeFinal(ByteBuffer src) |
long | writeFinal(ByteBuffer[] srcs) |
long | writeFinal(ByteBuffer[] srcs, int offset, int length) |
protected final org.xnio.channels.StreamSinkChannel delegate
protected final org.xnio.ChannelListener.SimpleSetter<T extends DelegatingStreamSinkChannel> writeSetter
protected final org.xnio.ChannelListener.SimpleSetter<T extends DelegatingStreamSinkChannel> closeSetter
public DelegatingStreamSinkChannel(org.xnio.channels.StreamSinkChannel delegate)
public long transferFrom(FileChannel src, long position, long count) throws IOException
transferFrom
in interface org.xnio.channels.StreamSinkChannel
IOException
public org.xnio.XnioWorker getWorker()
getWorker
in interface org.xnio.channels.CloseableChannel
public boolean isWriteResumed()
isWriteResumed
in interface org.xnio.channels.SuspendableWriteChannel
public boolean flush() throws IOException
flush
in interface org.xnio.channels.SuspendableWriteChannel
IOException
public void awaitWritable(long time, TimeUnit timeUnit) throws IOException
awaitWritable
in interface org.xnio.channels.SuspendableWriteChannel
IOException
public int write(ByteBuffer src) throws IOException
write
in interface WritableByteChannel
IOException
public long write(ByteBuffer[] srcs, int offset, int length) throws IOException
write
in interface GatheringByteChannel
IOException
public void awaitWritable() throws IOException
awaitWritable
in interface org.xnio.channels.SuspendableWriteChannel
IOException
public <T> T setOption(org.xnio.Option<T> option, T value) throws IllegalArgumentException, IOException
setOption
in interface org.xnio.channels.Configurable
IllegalArgumentException
IOException
public org.xnio.ChannelListener.Setter<? extends org.xnio.channels.StreamSinkChannel> getCloseSetter()
getCloseSetter
in interface org.xnio.channels.CloseableChannel
getCloseSetter
in interface org.xnio.channels.StreamSinkChannel
getCloseSetter
in interface org.xnio.channels.SuspendableWriteChannel
public org.xnio.ChannelListener.Setter<? extends org.xnio.channels.StreamSinkChannel> getWriteSetter()
getWriteSetter
in interface org.xnio.channels.StreamSinkChannel
getWriteSetter
in interface org.xnio.channels.SuspendableWriteChannel
public boolean supportsOption(org.xnio.Option<?> option)
supportsOption
in interface org.xnio.channels.Configurable
public final long write(ByteBuffer[] srcs) throws IOException
write
in interface GatheringByteChannel
IOException
public void resumeWrites()
resumeWrites
in interface org.xnio.channels.SuspendableWriteChannel
public boolean isOpen()
public void shutdownWrites() throws IOException
shutdownWrites
in interface org.xnio.channels.SuspendableWriteChannel
IOException
public long transferFrom(org.xnio.channels.StreamSourceChannel source, long count, ByteBuffer throughBuffer) throws IOException
transferFrom
in interface org.xnio.channels.StreamSinkChannel
IOException
public org.xnio.XnioExecutor getWriteThread()
getWriteThread
in interface org.xnio.channels.SuspendableWriteChannel
public void wakeupWrites()
wakeupWrites
in interface org.xnio.channels.SuspendableWriteChannel
public void close() throws IOException
close
in interface Closeable
close
in interface AutoCloseable
close
in interface Channel
close
in interface InterruptibleChannel
close
in interface org.xnio.channels.CloseableChannel
close
in interface org.xnio.channels.SuspendableWriteChannel
IOException
public <T> T getOption(org.xnio.Option<T> option) throws IOException
getOption
in interface org.xnio.channels.Configurable
IOException
public void suspendWrites()
suspendWrites
in interface org.xnio.channels.SuspendableWriteChannel
public org.xnio.XnioIoThread getIoThread()
getIoThread
in interface org.xnio.channels.CloseableChannel
public int writeFinal(ByteBuffer src) throws IOException
writeFinal
in interface org.xnio.channels.StreamSinkChannel
IOException
public long writeFinal(ByteBuffer[] srcs, int offset, int length) throws IOException
writeFinal
in interface org.xnio.channels.StreamSinkChannel
IOException
public long writeFinal(ByteBuffer[] srcs) throws IOException
writeFinal
in interface org.xnio.channels.StreamSinkChannel
IOException
Copyright © 2015 JBoss by Red Hat. All rights reserved.