public class ReadableSizedSelectionChannel extends ReadableBufferedChannel
| Constructor and Description |
|---|
ReadableSizedSelectionChannel(CompletionListener completionListener,
Buffer buffer,
ReadableSelectionChannel source,
long availableSize,
WakeupListener wakeupListener)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
protected long |
getAvailableSize()
Returns the remaining size that should be read from the source channel.
|
int |
onDrain(Buffer buffer,
int maxDrained,
Object... args)
Drains the byte buffer.
|
protected void |
setAvailableSize(long availableSize)
Sets the remaining size that should be read from the source channel.
|
couldDrain, couldFill, isEndReached, onFill, onMessageCompleted, read, setEndReachedcanLoop, close, getBuffer, onFillEof, postProcess, preProcessgetRegistration, isBlocking, setRegistration, toStringgetWrappedChannel, isOpenclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetRegistrationisBlockingpublic ReadableSizedSelectionChannel(CompletionListener completionListener, Buffer buffer, ReadableSelectionChannel source, long availableSize, WakeupListener wakeupListener)
completionListener - The listener to callback upon reading completion.buffer - The source byte buffer, typically remaining from previous read
processing.source - The source channel.availableSize - The total available size that can be read from the source
channel.wakeupListener - The wakeup listener that will be notified.protected long getAvailableSize()
public int onDrain(Buffer buffer, int maxDrained, Object... args) throws IOException
ReadableBufferedChannelonDrain in interface BufferProcessoronDrain in class ReadableBufferedChannelbuffer - 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.IOExceptionprotected void setAvailableSize(long availableSize)
throws IOException
availableSize - The remaining size that should be read from the source
channel.IOExceptionCopyright © 2005–2016. All rights reserved.