Package org.xnio.channels
Class AssembledConnectedSslStreamChannel
java.lang.Object
org.xnio.channels.AssembledStreamChannel
org.xnio.channels.AssembledConnectedStreamChannel
org.xnio.channels.AssembledConnectedSslStreamChannel
- All Implemented Interfaces:
Closeable,AutoCloseable,ByteChannel,Channel,GatheringByteChannel,InterruptibleChannel,ReadableByteChannel,ScatteringByteChannel,WritableByteChannel,BoundChannel,ByteChannel,CloseableChannel,Configurable,ConnectedChannel,ConnectedSslStreamChannel,ConnectedStreamChannel,SslChannel,StreamChannel,StreamSinkChannel,StreamSourceChannel,SuspendableChannel,SuspendableReadChannel,SuspendableWriteChannel
public class AssembledConnectedSslStreamChannel
extends AssembledConnectedStreamChannel
implements ConnectedSslStreamChannel
A connected SSL stream channel assembled from a stream source and stream sink.
- Author:
- David M. Lloyd
-
Field Summary
Fields inherited from interface org.xnio.channels.Configurable
EMPTY -
Constructor Summary
ConstructorsConstructorDescriptionAssembledConnectedSslStreamChannel(SslChannel sslChannel, StreamSourceChannel source, StreamSinkChannel sink) Construct a new instance.Construct a new instance. -
Method Summary
Modifier and TypeMethodDescriptionGet the setter which can be used to change the close listener for this channel.Get the setter which can be used to change the handshake listener for this channel.Get the setter which can be used to change the read listener for this channel.Get the currentSSLSessionfor this channel.Get the setter which can be used to change the write listener for this channel.voidStart or restart the SSL/TLS handshake.Methods inherited from class org.xnio.channels.AssembledConnectedStreamChannel
getLocalAddress, getLocalAddress, getPeerAddress, getPeerAddressMethods inherited from class org.xnio.channels.AssembledStreamChannel
awaitReadable, awaitReadable, awaitWritable, awaitWritable, close, flush, getIoThread, getOption, getReadThread, getWorker, getWriteThread, isOpen, isReadResumed, isWriteResumed, read, read, read, resumeReads, resumeWrites, setOption, shutdownReads, shutdownWrites, supportsOption, suspendReads, suspendWrites, transferFrom, transferFrom, transferTo, transferTo, wakeupReads, wakeupWrites, write, write, write, writeFinal, writeFinal, writeFinalMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.xnio.channels.BoundChannel
getLocalAddress, getLocalAddressMethods inherited from interface org.xnio.channels.CloseableChannel
getIoThread, getWorkerMethods inherited from interface org.xnio.channels.Configurable
getOption, setOption, supportsOptionMethods inherited from interface org.xnio.channels.ConnectedChannel
getPeerAddress, getPeerAddressMethods inherited from interface java.nio.channels.GatheringByteChannel
write, writeMethods inherited from interface java.nio.channels.ReadableByteChannel
readMethods inherited from interface java.nio.channels.ScatteringByteChannel
read, readMethods inherited from interface org.xnio.channels.StreamSinkChannel
transferFrom, transferFrom, writeFinal, writeFinal, writeFinalMethods inherited from interface org.xnio.channels.StreamSourceChannel
transferTo, transferToMethods inherited from interface org.xnio.channels.SuspendableReadChannel
awaitReadable, awaitReadable, getReadThread, isReadResumed, resumeReads, shutdownReads, suspendReads, wakeupReadsMethods inherited from interface org.xnio.channels.SuspendableWriteChannel
awaitWritable, awaitWritable, close, flush, getWriteThread, isOpen, isWriteResumed, resumeWrites, shutdownWrites, suspendWrites, wakeupWritesMethods inherited from interface java.nio.channels.WritableByteChannel
write
-
Constructor Details
-
AssembledConnectedSslStreamChannel
public AssembledConnectedSslStreamChannel(SslChannel sslChannel, StreamSourceChannel source, StreamSinkChannel sink) Construct a new instance.- Parameters:
sslChannel- the SSL channelsource- the sourcesink- the sink
-
AssembledConnectedSslStreamChannel
Construct a new instance. At least one side must be an SSL channel.- Parameters:
source- the sourcesink- the sink
-
-
Method Details
-
startHandshake
Description copied from interface:SslChannelStart or restart the SSL/TLS handshake. To force a complete SSL/TLS session renegotiation, the current session should be invalidated prior to calling this method. This method is not needed for the initial handshake as sending or receiving over the channel will automatically initiate it.- Specified by:
startHandshakein interfaceSslChannel- Throws:
IOException- if an I/O error occurs
-
getSslSession
Description copied from interface:SslChannelGet the currentSSLSessionfor this channel.- Specified by:
getSslSessionin interfaceSslChannel- Returns:
- the current
SSLSession
-
getHandshakeSetter
Description copied from interface:SslChannelGet the setter which can be used to change the handshake listener for this channel.- Specified by:
getHandshakeSetterin interfaceSslChannel- Returns:
- the setter
-
getCloseSetter
Description copied from interface:StreamChannelGet the setter which can be used to change the close listener for this channel. If the channel is already closed, then the listener will not be called.- Specified by:
getCloseSetterin interfaceBoundChannel- Specified by:
getCloseSetterin interfaceCloseableChannel- Specified by:
getCloseSetterin interfaceConnectedChannel- Specified by:
getCloseSetterin interfaceConnectedSslStreamChannel- Specified by:
getCloseSetterin interfaceConnectedStreamChannel- Specified by:
getCloseSetterin interfaceSslChannel- Specified by:
getCloseSetterin interfaceStreamChannel- Specified by:
getCloseSetterin interfaceStreamSinkChannel- Specified by:
getCloseSetterin interfaceStreamSourceChannel- Specified by:
getCloseSetterin interfaceSuspendableChannel- Specified by:
getCloseSetterin interfaceSuspendableReadChannel- Specified by:
getCloseSetterin interfaceSuspendableWriteChannel- Overrides:
getCloseSetterin classAssembledConnectedStreamChannel- Returns:
- the setter
-
getReadSetter
Description copied from interface:StreamChannelGet the setter which can be used to change the read listener for this channel.- Specified by:
getReadSetterin interfaceConnectedSslStreamChannel- Specified by:
getReadSetterin interfaceConnectedStreamChannel- Specified by:
getReadSetterin interfaceStreamChannel- Specified by:
getReadSetterin interfaceStreamSourceChannel- Specified by:
getReadSetterin interfaceSuspendableChannel- Specified by:
getReadSetterin interfaceSuspendableReadChannel- Overrides:
getReadSetterin classAssembledConnectedStreamChannel- Returns:
- the setter
-
getWriteSetter
Description copied from interface:StreamChannelGet the setter which can be used to change the write listener for this channel.- Specified by:
getWriteSetterin interfaceConnectedSslStreamChannel- Specified by:
getWriteSetterin interfaceConnectedStreamChannel- Specified by:
getWriteSetterin interfaceStreamChannel- Specified by:
getWriteSetterin interfaceStreamSinkChannel- Specified by:
getWriteSetterin interfaceSuspendableChannel- Specified by:
getWriteSetterin interfaceSuspendableWriteChannel- Overrides:
getWriteSetterin classAssembledConnectedStreamChannel- Returns:
- the setter
-