public class ReadableSslChannel extends ReadableBufferedChannel implements TasksListener
SelectionChannel
as some framework classes
rely on this down the processing chain.Constructor and Description |
---|
ReadableSslChannel(ReadableSelectionChannel source,
SslConnection<?> connection,
WakeupListener wakeupListener)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
protected SslConnection<?> |
getConnection()
Returns the parent SSL connection.
|
void |
onCompleted()
Callback method invoked upon delegated tasks completion.
|
int |
onDrain(Buffer buffer,
int maxDrained,
Object... args)
Drains the byte buffer.
|
void |
postProcess(int drained)
Does nothing by default.
|
couldDrain, couldFill, isEndReached, onFill, onMessageCompleted, read, setEndReached
canLoop, close, getBuffer, onFillEof, preProcess
getRegistration, isBlocking, setRegistration, toString
getWrappedChannel, isOpen
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getRegistration
isBlocking
public ReadableSslChannel(ReadableSelectionChannel source, SslConnection<?> connection, WakeupListener wakeupListener)
source
- The source channel.connection
- The parent SSL connection.wakeupListener
- The wakeup listener that will be notified.protected SslConnection<?> getConnection()
public void onCompleted()
onCompleted
in interface TasksListener
public int onDrain(Buffer buffer, int maxDrained, Object... args) throws IOException
onDrain
in interface BufferProcessor
onDrain
in class ReadableBufferedChannel
buffer
- 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.IOException
public void postProcess(int drained) throws IOException
BufferedSelectionChannel
postProcess
in interface BufferProcessor
postProcess
in class BufferedSelectionChannel<ReadableSelectionChannel>
drained
- The number of bytes drained or -1 if the filling source has
ended.IOException
Copyright © 2005–2018. All rights reserved.