Class ReadableSslChannel
- java.lang.Object
-
- org.restlet.ext.nio.internal.channel.WrapperChannel<T>
-
- org.restlet.ext.nio.internal.channel.WrapperSelectionChannel<T>
-
- org.restlet.ext.nio.internal.channel.BufferedSelectionChannel<ReadableSelectionChannel>
-
- org.restlet.ext.nio.internal.channel.ReadableBufferedChannel
-
- org.restlet.ext.nio.internal.channel.ReadableSslChannel
-
- All Implemented Interfaces:
java.io.Closeable,java.lang.AutoCloseable,java.nio.channels.Channel,java.nio.channels.ReadableByteChannel,BlockableChannel,ReadableSelectionChannel,SelectionChannel,BufferProcessor,CompletionListener,TasksListener
@Deprecated public class ReadableSslChannel extends ReadableBufferedChannel implements TasksListener
Deprecated.Will be removed to favor lower-level network extensions allowing more control at the Restlet API level.SSL byte channel that unwraps all read data using the SSL/TLS protocols. It is important to implementSelectionChannelas some framework classes rely on this down the processing chain.
-
-
Field Summary
Fields Modifier and Type Field Description private SslConnection<?>connectionDeprecated.The parent SSL connection.
-
Constructor Summary
Constructors Constructor Description ReadableSslChannel(ReadableSelectionChannel source, SslConnection<?> connection, WakeupListener wakeupListener)Deprecated.Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description protected SslConnection<?>getConnection()Deprecated.Returns the parent SSL connection.voidonCompleted()Deprecated.Callback method invoked upon delegated tasks completion.intonDrain(Buffer buffer, int maxDrained, java.lang.Object... args)Deprecated.Drains the byte buffer.voidpostProcess(int drained)Deprecated.Does nothing by default.-
Methods inherited from class org.restlet.ext.nio.internal.channel.ReadableBufferedChannel
couldDrain, couldFill, isEndReached, onFill, onMessageCompleted, read, setEndReached
-
Methods inherited from class org.restlet.ext.nio.internal.channel.BufferedSelectionChannel
canLoop, close, getBuffer, onFillEof, preProcess
-
Methods inherited from class org.restlet.ext.nio.internal.channel.WrapperSelectionChannel
getRegistration, isBlocking, setRegistration, toString
-
Methods inherited from class org.restlet.ext.nio.internal.channel.WrapperChannel
getWrappedChannel, isOpen
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.restlet.engine.io.BlockableChannel
isBlocking
-
Methods inherited from interface org.restlet.engine.io.SelectionChannel
getRegistration
-
-
-
-
Field Detail
-
connection
private final SslConnection<?> connection
Deprecated.The parent SSL connection.
-
-
Constructor Detail
-
ReadableSslChannel
public ReadableSslChannel(ReadableSelectionChannel source, SslConnection<?> connection, WakeupListener wakeupListener)
Deprecated.Constructor.- Parameters:
source- The source channel.connection- The parent SSL connection.wakeupListener- The wakeup listener that will be notified.
-
-
Method Detail
-
getConnection
protected SslConnection<?> getConnection()
Deprecated.Returns the parent SSL connection.- Returns:
- The parent SSL connection.
-
onCompleted
public void onCompleted()
Deprecated.Callback method invoked upon delegated tasks completion.- Specified by:
onCompletedin interfaceTasksListener
-
onDrain
public int onDrain(Buffer buffer, int maxDrained, java.lang.Object... args) throws java.io.IOException
Deprecated.Drains the byte buffer. By default, it decrypts the SSL data and copies as many byte as possible to the target buffer, with no modification.- Specified by:
onDrainin interfaceBufferProcessor- Overrides:
onDrainin classReadableBufferedChannel- Parameters:
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.- Returns:
- The number of bytes drained.
- Throws:
java.io.IOException
-
postProcess
public void postProcess(int drained) throws java.io.IOExceptionDeprecated.Description copied from class:BufferedSelectionChannelDoes nothing by default.- Specified by:
postProcessin interfaceBufferProcessor- Overrides:
postProcessin classBufferedSelectionChannel<ReadableSelectionChannel>- Parameters:
drained- The number of bytes drained or -1 if the filling source has ended.- Throws:
java.io.IOException
-
-