java.io.Closeable, java.lang.AutoCloseable, java.nio.channels.Channel, java.nio.channels.InterruptibleChannel, java.nio.channels.ReadableByteChannel, java.nio.channels.ScatteringByteChannel, org.xnio.channels.CloseableChannel, org.xnio.channels.Configurable, org.xnio.channels.StreamSourceChannel, org.xnio.channels.SuspendableReadChannelpublic abstract class DetachableStreamSourceChannel
extends java.lang.Object
implements org.xnio.channels.StreamSourceChannel
| Modifier and Type | Field | Description |
|---|---|---|
protected org.xnio.ChannelListener.SimpleSetter<DetachableStreamSourceChannel> |
closeSetter |
|
protected org.xnio.channels.StreamSourceChannel |
delegate |
|
protected org.xnio.ChannelListener.SimpleSetter<DetachableStreamSourceChannel> |
readSetter |
| Constructor | Description |
|---|---|
DetachableStreamSourceChannel(org.xnio.channels.StreamSourceChannel delegate) |
| Modifier and Type | Method | Description |
|---|---|---|
void |
awaitReadable() |
|
void |
awaitReadable(long time,
java.util.concurrent.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(java.nio.ByteBuffer dst) |
|
long |
read(java.nio.ByteBuffer[] dsts) |
|
long |
read(java.nio.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 position,
long count,
java.nio.channels.FileChannel target) |
|
long |
transferTo(long count,
java.nio.ByteBuffer throughBuffer,
org.xnio.channels.StreamSinkChannel 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.SuspendableReadChannelpublic long transferTo(long position,
long count,
java.nio.channels.FileChannel target)
throws java.io.IOException
transferTo in interface org.xnio.channels.StreamSourceChanneljava.io.IOExceptionpublic void awaitReadable()
throws java.io.IOException
awaitReadable in interface org.xnio.channels.SuspendableReadChanneljava.io.IOExceptionpublic void suspendReads()
suspendReads in interface org.xnio.channels.SuspendableReadChannelpublic long transferTo(long count,
java.nio.ByteBuffer throughBuffer,
org.xnio.channels.StreamSinkChannel target)
throws java.io.IOException
transferTo in interface org.xnio.channels.StreamSourceChanneljava.io.IOExceptionpublic org.xnio.XnioWorker getWorker()
getWorker in interface org.xnio.channels.CloseableChannelpublic boolean isReadResumed()
isReadResumed in interface org.xnio.channels.SuspendableReadChannelpublic <T> T setOption(org.xnio.Option<T> option,
T value)
throws java.lang.IllegalArgumentException,
java.io.IOException
setOption in interface org.xnio.channels.Configurablejava.lang.IllegalArgumentExceptionjava.io.IOExceptionpublic boolean supportsOption(org.xnio.Option<?> option)
supportsOption in interface org.xnio.channels.Configurablepublic void shutdownReads()
throws java.io.IOException
shutdownReads in interface org.xnio.channels.SuspendableReadChanneljava.io.IOExceptionpublic org.xnio.ChannelListener.Setter<? extends org.xnio.channels.StreamSourceChannel> getReadSetter()
getReadSetter in interface org.xnio.channels.StreamSourceChannelgetReadSetter in interface org.xnio.channels.SuspendableReadChannelpublic boolean isOpen()
isOpen in interface java.nio.channels.Channelpublic long read(java.nio.ByteBuffer[] dsts)
throws java.io.IOException
read in interface java.nio.channels.ScatteringByteChanneljava.io.IOExceptionpublic long read(java.nio.ByteBuffer[] dsts,
int offset,
int length)
throws java.io.IOException
read in interface java.nio.channels.ScatteringByteChanneljava.io.IOExceptionpublic void wakeupReads()
wakeupReads in interface org.xnio.channels.SuspendableReadChannelpublic org.xnio.XnioExecutor getReadThread()
getReadThread in interface org.xnio.channels.SuspendableReadChannelpublic void awaitReadable(long time,
java.util.concurrent.TimeUnit timeUnit)
throws java.io.IOException
awaitReadable in interface org.xnio.channels.SuspendableReadChanneljava.io.IOExceptionpublic org.xnio.ChannelListener.Setter<? extends org.xnio.channels.StreamSourceChannel> getCloseSetter()
getCloseSetter in interface org.xnio.channels.CloseableChannelgetCloseSetter in interface org.xnio.channels.StreamSourceChannelgetCloseSetter in interface org.xnio.channels.SuspendableReadChannelpublic void close()
throws java.io.IOException
close in interface java.lang.AutoCloseableclose in interface java.nio.channels.Channelclose in interface java.io.Closeableclose in interface org.xnio.channels.CloseableChannelclose in interface java.nio.channels.InterruptibleChanneljava.io.IOExceptionpublic <T> T getOption(org.xnio.Option<T> option)
throws java.io.IOException
getOption in interface org.xnio.channels.Configurablejava.io.IOExceptionpublic int read(java.nio.ByteBuffer dst)
throws java.io.IOException
read in interface java.nio.channels.ReadableByteChanneljava.io.IOExceptionpublic org.xnio.XnioIoThread getIoThread()
getIoThread in interface org.xnio.channels.CloseableChannelCopyright © 2018. All rights reserved.