public class WritableSslChannel extends WritableBufferedChannel implements TasksListener
SelectionChannel as some framework
classes rely on this down the processing chain.| Constructor and Description |
|---|
WritableSslChannel(WritableSelectionChannel target,
SslConnection<?> connection,
WakeupListener wakeupListener)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
canLoop(Buffer buffer,
Object... args)
Indicates if the processing loop can continue.
|
boolean |
couldFill(Buffer buffer,
Object... args)
Indicates if the buffer could be filled again.
|
protected SslConnection<?> |
getConnection()
Returns the parent SSL connection.
|
void |
onCompleted()
Callback method invoked upon delegated tasks completion.
|
int |
onFill(Buffer buffer,
Object... args)
Fills the byte buffer by writing the current message.
|
void |
postProcess(int drained)
Does nothing by default.
|
int |
write(ByteBuffer sourceBuffer)
Reads some bytes and put them into the destination buffer.
|
couldDrain, onDrainclose, getBuffer, onFillEof, preProcessgetRegistration, isBlocking, setRegistration, toStringgetWrappedChannel, isOpenclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetRegistrationisBlockingpublic WritableSslChannel(WritableSelectionChannel target, SslConnection<?> connection, WakeupListener wakeupListener)
target - The wrapped channel.connection - The parent SSL connection.wakeupListener - The wakeup listener that will be notified.public boolean canLoop(Buffer buffer, Object... args)
BufferedSelectionChannelcanLoop in interface BufferProcessorcanLoop in class BufferedSelectionChannel<WritableSelectionChannel>buffer - The IO buffer to drain.args - The optional arguments to pass back to the callbacks.public boolean couldFill(Buffer buffer, Object... args)
WritableBufferedChannelcouldFill in interface BufferProcessorcouldFill in class WritableBufferedChannelbuffer - The IO buffer to fill.args - The optional arguments to pass back to the callbacks.protected SslConnection<?> getConnection()
public void onCompleted()
onCompleted in interface TasksListenerpublic int onFill(Buffer buffer, Object... args) throws IOException
WritableBufferedChannelonFill in interface BufferProcessoronFill in class WritableBufferedChannelbuffer - The IO buffer to drain.args - The optional arguments to pass back to the callbacks.IOExceptionpublic void postProcess(int drained)
throws IOException
BufferedSelectionChannelpostProcess in interface BufferProcessorpostProcess in class BufferedSelectionChannel<WritableSelectionChannel>drained - The number of bytes drained or -1 if the filling source has
ended.IOExceptionpublic int write(ByteBuffer sourceBuffer) throws IOException
WritableBufferedChannelwrite in interface WritableByteChannelwrite in class WritableBufferedChannelsourceBuffer - The source buffer.IOExceptionCopyright © 2005–2015. All rights reserved.