Class ChannelFunctionStreamSourceChannel
java.lang.Object
io.undertow.websockets.core.function.ChannelFunctionStreamSourceChannel
- All Implemented Interfaces:
Closeable
,AutoCloseable
,Channel
,InterruptibleChannel
,ReadableByteChannel
,ScatteringByteChannel
,org.xnio.channels.CloseableChannel
,org.xnio.channels.Configurable
,org.xnio.channels.StreamSourceChannel
,org.xnio.channels.SuspendableReadChannel
public class ChannelFunctionStreamSourceChannel
extends Object
implements org.xnio.channels.StreamSourceChannel
- Author:
- Norman Maurer
-
Field Summary
Fields inherited from interface org.xnio.channels.Configurable
EMPTY
-
Constructor Summary
ConstructorsConstructorDescriptionChannelFunctionStreamSourceChannel
(org.xnio.channels.StreamSourceChannel channel, ChannelFunction... functions) -
Method Summary
Modifier and TypeMethodDescriptionvoid
void
awaitReadable
(long time, TimeUnit timeUnit) void
close()
org.xnio.ChannelListener.Setter<? extends org.xnio.channels.StreamSourceChannel>
org.xnio.XnioIoThread
<T> T
getOption
(org.xnio.Option<T> option) org.xnio.ChannelListener.Setter<? extends org.xnio.channels.StreamSourceChannel>
org.xnio.XnioExecutor
org.xnio.XnioWorker
boolean
isOpen()
boolean
int
read
(ByteBuffer dst) long
read
(ByteBuffer[] dsts) long
read
(ByteBuffer[] dsts, int offset, int length) void
<T> T
setOption
(org.xnio.Option<T> option, T value) void
boolean
supportsOption
(org.xnio.Option<?> option) void
long
transferTo
(long position, long count, FileChannel target) long
transferTo
(long count, ByteBuffer throughBuffer, org.xnio.channels.StreamSinkChannel target) void
-
Constructor Details
-
ChannelFunctionStreamSourceChannel
public ChannelFunctionStreamSourceChannel(org.xnio.channels.StreamSourceChannel channel, ChannelFunction... functions)
-
-
Method Details
-
transferTo
- Specified by:
transferTo
in interfaceorg.xnio.channels.StreamSourceChannel
- Throws:
IOException
-
transferTo
public long transferTo(long count, ByteBuffer throughBuffer, org.xnio.channels.StreamSinkChannel target) throws IOException - Specified by:
transferTo
in interfaceorg.xnio.channels.StreamSourceChannel
- Throws:
IOException
-
getReadSetter
public org.xnio.ChannelListener.Setter<? extends org.xnio.channels.StreamSourceChannel> getReadSetter()- Specified by:
getReadSetter
in interfaceorg.xnio.channels.StreamSourceChannel
- Specified by:
getReadSetter
in interfaceorg.xnio.channels.SuspendableReadChannel
-
getCloseSetter
public org.xnio.ChannelListener.Setter<? extends org.xnio.channels.StreamSourceChannel> getCloseSetter()- Specified by:
getCloseSetter
in interfaceorg.xnio.channels.CloseableChannel
- Specified by:
getCloseSetter
in interfaceorg.xnio.channels.StreamSourceChannel
- Specified by:
getCloseSetter
in interfaceorg.xnio.channels.SuspendableReadChannel
-
read
- Specified by:
read
in interfaceScatteringByteChannel
- Throws:
IOException
-
read
- Specified by:
read
in interfaceScatteringByteChannel
- Throws:
IOException
-
suspendReads
public void suspendReads()- Specified by:
suspendReads
in interfaceorg.xnio.channels.SuspendableReadChannel
-
resumeReads
public void resumeReads()- Specified by:
resumeReads
in interfaceorg.xnio.channels.SuspendableReadChannel
-
isReadResumed
public boolean isReadResumed()- Specified by:
isReadResumed
in interfaceorg.xnio.channels.SuspendableReadChannel
-
wakeupReads
public void wakeupReads()- Specified by:
wakeupReads
in interfaceorg.xnio.channels.SuspendableReadChannel
-
shutdownReads
- Specified by:
shutdownReads
in interfaceorg.xnio.channels.SuspendableReadChannel
- Throws:
IOException
-
awaitReadable
- Specified by:
awaitReadable
in interfaceorg.xnio.channels.SuspendableReadChannel
- Throws:
IOException
-
awaitReadable
- Specified by:
awaitReadable
in interfaceorg.xnio.channels.SuspendableReadChannel
- Throws:
IOException
-
getReadThread
public org.xnio.XnioExecutor getReadThread()- Specified by:
getReadThread
in interfaceorg.xnio.channels.SuspendableReadChannel
-
read
- Specified by:
read
in interfaceReadableByteChannel
- Throws:
IOException
-
getWorker
public org.xnio.XnioWorker getWorker()- Specified by:
getWorker
in interfaceorg.xnio.channels.CloseableChannel
-
getIoThread
public org.xnio.XnioIoThread getIoThread()- Specified by:
getIoThread
in interfaceorg.xnio.channels.CloseableChannel
-
supportsOption
public boolean supportsOption(org.xnio.Option<?> option) - Specified by:
supportsOption
in interfaceorg.xnio.channels.Configurable
-
getOption
- Specified by:
getOption
in interfaceorg.xnio.channels.Configurable
- Throws:
IOException
-
setOption
- Specified by:
setOption
in interfaceorg.xnio.channels.Configurable
- Throws:
IOException
-
isOpen
public boolean isOpen() -
close
- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceChannel
- Specified by:
close
in interfaceCloseable
- Specified by:
close
in interfaceorg.xnio.channels.CloseableChannel
- Specified by:
close
in interfaceInterruptibleChannel
- Throws:
IOException
-