|
XNIO API 2.0.0.GA | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface SuspendableWriteChannel
A suspendable writable channel. This type of channel is associated with a handler which can suspend and resume writes as needed.
Method Summary | |
---|---|
void |
awaitWritable()
Block until this channel becomes writable again. |
void |
awaitWritable(long time,
java.util.concurrent.TimeUnit timeUnit)
Block until this channel becomes writable again, or until the timeout expires. |
boolean |
flush()
Flush any waiting partial send or write. |
ChannelListener.Setter<? extends SuspendableWriteChannel> |
getCloseSetter()
Get the setter which can be used to change the close handler for this channel. |
ChannelListener.Setter<? extends SuspendableWriteChannel> |
getWriteSetter()
Get the setter which can be used to change the write handler for this channel. |
void |
resumeWrites()
Resume writes on this channel. |
boolean |
shutdownWrites()
Indicate that writing is complete for this channel. |
void |
suspendWrites()
Suspend further write notifications on this channel. |
Methods inherited from interface java.nio.channels.Channel |
---|
close, isOpen |
Methods inherited from interface org.jboss.xnio.channels.Configurable |
---|
getOption, setOption, supportsOption |
Method Detail |
---|
void suspendWrites()
void resumeWrites()
boolean shutdownWrites() throws java.io.IOException
true
if the write channel was closed, or false
if the operation would have blocked
java.io.IOException
- if an I/O error occursvoid awaitWritable() throws java.io.IOException
java.io.InterruptedIOException
- if the operation is interrupted; the thread's interrupt flag will be set as well
java.io.IOException
- if an I/O error occursvoid awaitWritable(long time, java.util.concurrent.TimeUnit timeUnit) throws java.io.IOException
time
- the time to waittimeUnit
- the time unit
java.io.InterruptedIOException
- if the operation is interrupted; the thread's interrupt flag will be set as well
java.io.IOException
- if an I/O error occursChannelListener.Setter<? extends SuspendableWriteChannel> getWriteSetter()
ChannelListener.Setter<? extends SuspendableWriteChannel> getCloseSetter()
getCloseSetter
in interface CloseableChannel
boolean flush() throws java.io.IOException
true
in this case, since there is no outstanding data to flush.
true
if the message was flushed, or false
if the result would block
java.io.IOException
- if an I/O error occurs
|
XNIO API 2.0.0.GA | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |