public interface SuspendableReadChannel extends CloseableChannel
Modifier and Type | Method and Description |
---|---|
void |
awaitReadable()
Block until this channel becomes readable again.
|
void |
awaitReadable(long time,
java.util.concurrent.TimeUnit timeUnit)
Block until this channel becomes readable again, or until the timeout expires.
|
ChannelListener.Setter<? extends SuspendableReadChannel> |
getCloseSetter()
Get the setter which can be used to change the close listener for this channel.
|
ChannelListener.Setter<? extends SuspendableReadChannel> |
getReadSetter()
Get the setter which can be used to change the read listener for this channel.
|
XnioExecutor |
getReadThread()
Get the read thread for this channel.
|
boolean |
isReadResumed()
Determine whether reads are resumed.
|
void |
resumeReads()
Resume reads on this channel.
|
void |
shutdownReads()
Places this readable channel at "end of stream".
|
void |
suspendReads()
Suspend further read notifications on this channel.
|
void |
wakeupReads()
Resume reads on this channel, and force the read listener to be triggered even if the
channel isn't actually readable. |
close, getWorker
getOption, setOption, supportsOption
void suspendReads()
void resumeReads()
boolean isReadResumed()
true
if reads are resumed, false
if reads are suspendedvoid wakeupReads()
Resume reads
on this channel, and force the read listener to be triggered even if the
channel isn't actually readable.void shutdownReads() throws java.io.IOException
CloseableChannel.close()
to be called automatically.java.io.IOException
- if an I/O error occursvoid awaitReadable() throws java.io.IOException
java.io.InterruptedIOException
- if the operation is interrupted; the thread's interrupt flag will be set as welljava.io.IOException
- if an I/O error occursvoid awaitReadable(long time, java.util.concurrent.TimeUnit timeUnit) throws java.io.IOException
time
- the time to waittimeUnit
- the time unitjava.io.InterruptedIOException
- if the operation is interrupted; the thread's interrupt flag will be set as welljava.io.IOException
- if an I/O error occursXnioExecutor getReadThread()
null
if none is configured or availableChannelListener.Setter<? extends SuspendableReadChannel> getReadSetter()
ChannelListener.Setter<? extends SuspendableReadChannel> getCloseSetter()
getCloseSetter
in interface CloseableChannel
Copyright © 2010 JBoss, a division of Red Hat, Inc.