public abstract class DetachableStreamSourceChannel extends Object implements org.xnio.channels.StreamSourceChannel
Modifier and Type | Field and Description |
---|---|
protected org.xnio.ChannelListener.SimpleSetter<DetachableStreamSourceChannel> | closeSetter |
protected org.xnio.channels.StreamSourceChannel | delegate |
protected org.xnio.ChannelListener.SimpleSetter<DetachableStreamSourceChannel> | readSetter |
Constructor and Description |
---|
DetachableStreamSourceChannel(org.xnio.channels.StreamSourceChannel delegate) |
Modifier and Type | Method and Description |
---|---|
void | awaitReadable() |
void | awaitReadable(long time, TimeUnit timeUnit) |
void | close() |
org.xnio.ChannelListener.Setter<? extends org.xnio.channels.StreamSourceChannel> | getCloseSetter() |
org.xnio.XnioIoThread | getIoThread() |
<T> T | getOption(org.xnio.Option<T> option) |
org.xnio.ChannelListener.Setter<? extends org.xnio.channels.StreamSourceChannel> | getReadSetter() |
org.xnio.XnioExecutor | getReadThread() |
org.xnio.XnioWorker | getWorker() |
protected abstract boolean | isFinished() |
boolean | isOpen() |
boolean | isReadResumed() |
int | read(ByteBuffer dst) |
long | read(ByteBuffer[] dsts) |
long | read(ByteBuffer[] dsts, int offset, int length) |
void | resumeReads() |
<T> T | setOption(org.xnio.Option<T> option, T value) |
void | shutdownReads() |
boolean | supportsOption(org.xnio.Option<?> option) |
void | suspendReads() |
long | transferTo(long count, ByteBuffer throughBuffer, org.xnio.channels.StreamSinkChannel target) |
long | transferTo(long position, long count, FileChannel target) |
void | wakeupReads() |
protected final org.xnio.channels.StreamSourceChannel delegate
protected org.xnio.ChannelListener.SimpleSetter<DetachableStreamSourceChannel> readSetter
protected org.xnio.ChannelListener.SimpleSetter<DetachableStreamSourceChannel> closeSetter
public DetachableStreamSourceChannel(org.xnio.channels.StreamSourceChannel delegate)
protected abstract boolean isFinished()
public void resumeReads()
resumeReads
in interface org.xnio.channels.SuspendableReadChannel
public long transferTo(long position, long count, FileChannel target) throws IOException
transferTo
in interface org.xnio.channels.StreamSourceChannel
IOException
public void awaitReadable() throws IOException
awaitReadable
in interface org.xnio.channels.SuspendableReadChannel
IOException
public void suspendReads()
suspendReads
in interface org.xnio.channels.SuspendableReadChannel
public long transferTo(long count, ByteBuffer throughBuffer, org.xnio.channels.StreamSinkChannel target) throws IOException
transferTo
in interface org.xnio.channels.StreamSourceChannel
IOException
public org.xnio.XnioWorker getWorker()
getWorker
in interface org.xnio.channels.CloseableChannel
public boolean isReadResumed()
isReadResumed
in interface org.xnio.channels.SuspendableReadChannel
public <T> T setOption(org.xnio.Option<T> option, T value) throws IllegalArgumentException, IOException
setOption
in interface org.xnio.channels.Configurable
IllegalArgumentException
IOException
public boolean supportsOption(org.xnio.Option<?> option)
supportsOption
in interface org.xnio.channels.Configurable
public void shutdownReads() throws IOException
shutdownReads
in interface org.xnio.channels.SuspendableReadChannel
IOException
public org.xnio.ChannelListener.Setter<? extends org.xnio.channels.StreamSourceChannel> getReadSetter()
getReadSetter
in interface org.xnio.channels.StreamSourceChannel
getReadSetter
in interface org.xnio.channels.SuspendableReadChannel
public long read(ByteBuffer[] dsts) throws IOException
read
in interface ScatteringByteChannel
IOException
public long read(ByteBuffer[] dsts, int offset, int length) throws IOException
read
in interface ScatteringByteChannel
IOException
public void wakeupReads()
wakeupReads
in interface org.xnio.channels.SuspendableReadChannel
public org.xnio.XnioExecutor getReadThread()
getReadThread
in interface org.xnio.channels.SuspendableReadChannel
public void awaitReadable(long time, TimeUnit timeUnit) throws IOException
awaitReadable
in interface org.xnio.channels.SuspendableReadChannel
IOException
public org.xnio.ChannelListener.Setter<? extends org.xnio.channels.StreamSourceChannel> getCloseSetter()
getCloseSetter
in interface org.xnio.channels.CloseableChannel
getCloseSetter
in interface org.xnio.channels.StreamSourceChannel
getCloseSetter
in interface org.xnio.channels.SuspendableReadChannel
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
IOException
public <T> T getOption(org.xnio.Option<T> option) throws IOException
getOption
in interface org.xnio.channels.Configurable
IOException
public int read(ByteBuffer dst) throws IOException
read
in interface ReadableByteChannel
IOException
public org.xnio.XnioIoThread getIoThread()
getIoThread
in interface org.xnio.channels.CloseableChannel
Copyright © 2020 JBoss by Red Hat. All rights reserved.