public class WritableBufferedChannel extends BufferedSelectionChannel<WritableSelectionChannel> implements WritableSelectionChannel
| Constructor and Description |
|---|
WritableBufferedChannel(Buffer buffer,
WritableSelectionChannel target,
WakeupListener wakeupListener)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
couldDrain(Buffer buffer,
Object... args)
Indicates if the buffer could be drained again.
|
boolean |
couldFill(Buffer buffer,
Object... args)
Indicates if the buffer could be filled again.
|
int |
onDrain(Buffer buffer,
int maxDrained,
Object... args)
Drains the byte buffer.
|
int |
onFill(Buffer buffer,
Object... args)
Fills the byte buffer by writing the current message.
|
int |
write(ByteBuffer sourceBuffer)
Reads some bytes and put them into the destination buffer.
|
canLoop, close, getBuffer, onFillEof, postProcess, preProcessgetRegistration, isBlocking, setRegistration, toStringgetWrappedChannel, isOpenclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetRegistrationisBlockingpublic WritableBufferedChannel(Buffer buffer, WritableSelectionChannel target, WakeupListener wakeupListener)
buffer - The source byte buffer, typically remaining from previous read
processing.target - The target channel.wakeupListener - The wakeup listener that will be notified.public boolean couldDrain(Buffer buffer, Object... args)
buffer - The IO buffer to drain.args - The optional arguments to pass back to the callbacks.public boolean couldFill(Buffer buffer, Object... args)
couldFill in interface BufferProcessorbuffer - The IO buffer to fill.args - The optional arguments to pass back to the callbacks.public final int onDrain(Buffer buffer, int maxDrained, Object... args) throws IOException
onDrain in interface BufferProcessorbuffer - The IO buffer to drain.maxDrained - The maximum number of bytes drained by this call.args - The optional arguments to pass back to the callbacks.IOExceptionpublic int onFill(Buffer buffer, Object... args) throws IOException
onFill in interface BufferProcessorbuffer - The IO buffer to drain.args - The optional arguments to pass back to the callbacks.IOExceptionpublic int write(ByteBuffer sourceBuffer) throws IOException
write in interface WritableByteChannelsourceBuffer - The source buffer.IOExceptionCopyright © 2005–2015. All rights reserved.