|
XNIO API 2.1.0.CR2 | |||||||||
| 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 listener which can suspend and resume writes as needed.
| Method Summary | |
|---|---|
void |
awaitWritable()
Block until this channel becomes writable again. |
void |
awaitWritable(long time,
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 listener for this channel. |
ChannelListener.Setter<? extends SuspendableWriteChannel> |
getWriteSetter()
Get the setter which can be used to change the write listener 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 IOException
Channel.close() to be called automatically.
true if the write channel was closed, or false if the operation would have blocked
IOException - if an I/O error occurs
void awaitWritable()
throws IOException
InterruptedIOException - if the operation is interrupted; the thread's interrupt flag will be set as well
IOException - if an I/O error occurs
void awaitWritable(long time,
TimeUnit timeUnit)
throws IOException
time - the time to waittimeUnit - the time unit
InterruptedIOException - if the operation is interrupted; the thread's interrupt flag will be set as well
IOException - if an I/O error occursChannelListener.Setter<? extends SuspendableWriteChannel> getWriteSetter()
ChannelListener.Setter<? extends SuspendableWriteChannel> getCloseSetter()
getCloseSetter in interface CloseableChannel
boolean flush()
throws 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
IOException - if an I/O error occurs
|
XNIO API 2.1.0.CR2 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||