Class WritableSslChannel
- 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<WritableSelectionChannel>
-
- org.restlet.ext.nio.internal.channel.WritableBufferedChannel
-
- org.restlet.ext.nio.internal.channel.WritableSslChannel
-
- All Implemented Interfaces:
java.io.Closeable,java.lang.AutoCloseable,java.nio.channels.Channel,java.nio.channels.WritableByteChannel,BlockableChannel,SelectionChannel,BufferProcessor,WritableSelectionChannel,TasksListener
@Deprecated public class WritableSslChannel extends WritableBufferedChannel implements TasksListener
Deprecated.Will be removed to favor lower-level network extensions allowing more control at the Restlet API level.SSL byte channel that wraps all application 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 WritableSslChannel(WritableSelectionChannel target, SslConnection<?> connection, WakeupListener wakeupListener)Deprecated.Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description booleancanLoop(Buffer buffer, java.lang.Object... args)Deprecated.Indicates if the processing loop can continue.booleancouldFill(Buffer buffer, java.lang.Object... args)Deprecated.Indicates if the buffer could be filled again.protected SslConnection<?>getConnection()Deprecated.Returns the parent SSL connection.voidonCompleted()Deprecated.Callback method invoked upon delegated tasks completion.intonFill(Buffer buffer, java.lang.Object... args)Deprecated.Fills the byte buffer by writing the current message.voidpostProcess(int drained)Deprecated.Does nothing by default.intwrite(java.nio.ByteBuffer sourceBuffer)Deprecated.Reads some bytes and put them into the destination buffer.-
Methods inherited from class org.restlet.ext.nio.internal.channel.WritableBufferedChannel
couldDrain, onDrain
-
Methods inherited from class org.restlet.ext.nio.internal.channel.BufferedSelectionChannel
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
-
WritableSslChannel
public WritableSslChannel(WritableSelectionChannel target, SslConnection<?> connection, WakeupListener wakeupListener)
Deprecated.Constructor.- Parameters:
target- The wrapped channel.connection- The parent SSL connection.wakeupListener- The wakeup listener that will be notified.
-
-
Method Detail
-
canLoop
public boolean canLoop(Buffer buffer, java.lang.Object... args)
Deprecated.Description copied from class:BufferedSelectionChannelIndicates if the processing loop can continue.- Specified by:
canLoopin interfaceBufferProcessor- Overrides:
canLoopin classBufferedSelectionChannel<WritableSelectionChannel>- Parameters:
buffer- The IO buffer to drain.args- The optional arguments to pass back to the callbacks.- Returns:
- True if the processing loop can continue.
-
couldFill
public boolean couldFill(Buffer buffer, java.lang.Object... args)
Deprecated.Description copied from class:WritableBufferedChannelIndicates if the buffer could be filled again.- Specified by:
couldFillin interfaceBufferProcessor- Overrides:
couldFillin classWritableBufferedChannel- Parameters:
buffer- The IO buffer to fill.args- The optional arguments to pass back to the callbacks.- Returns:
- True if the buffer could be filled again.
-
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
-
onFill
public int onFill(Buffer buffer, java.lang.Object... args) throws java.io.IOException
Deprecated.Description copied from class:WritableBufferedChannelFills the byte buffer by writing the current message.- Specified by:
onFillin interfaceBufferProcessor- Overrides:
onFillin classWritableBufferedChannel- Parameters:
buffer- The IO buffer to drain.args- The optional arguments to pass back to the callbacks.- Returns:
- The number of bytes filled.
- 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<WritableSelectionChannel>- Parameters:
drained- The number of bytes drained or -1 if the filling source has ended.- Throws:
java.io.IOException
-
write
public int write(java.nio.ByteBuffer sourceBuffer) throws java.io.IOExceptionDeprecated.Description copied from class:WritableBufferedChannelReads some bytes and put them into the destination buffer. The bytes come from the underlying channel.- Specified by:
writein interfacejava.nio.channels.WritableByteChannel- Overrides:
writein classWritableBufferedChannel- Parameters:
sourceBuffer- The source buffer.- Returns:
- The number of bytes written, possibly 0.
- Throws:
java.io.IOException
-
-