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 currentSSLSession
for this channel.Get the setter which can be used to change the write listener for this channel.void
Start or restart the SSL/TLS handshake.Methods inherited from class org.xnio.channels.AssembledConnectedStreamChannel
getLocalAddress, getLocalAddress, getPeerAddress, getPeerAddress
Methods 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, writeFinal
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.xnio.channels.BoundChannel
getLocalAddress, getLocalAddress
Methods inherited from interface org.xnio.channels.CloseableChannel
getIoThread, getWorker
Methods inherited from interface org.xnio.channels.Configurable
getOption, setOption, supportsOption
Methods inherited from interface org.xnio.channels.ConnectedChannel
getPeerAddress, getPeerAddress
Methods inherited from interface java.nio.channels.GatheringByteChannel
write, write
Methods inherited from interface java.nio.channels.ReadableByteChannel
read
Methods inherited from interface java.nio.channels.ScatteringByteChannel
read, read
Methods inherited from interface org.xnio.channels.StreamSinkChannel
transferFrom, transferFrom, writeFinal, writeFinal, writeFinal
Methods inherited from interface org.xnio.channels.StreamSourceChannel
transferTo, transferTo
Methods inherited from interface org.xnio.channels.SuspendableReadChannel
awaitReadable, awaitReadable, getReadThread, isReadResumed, resumeReads, shutdownReads, suspendReads, wakeupReads
Methods inherited from interface org.xnio.channels.SuspendableWriteChannel
awaitWritable, awaitWritable, close, flush, getWriteThread, isOpen, isWriteResumed, resumeWrites, shutdownWrites, suspendWrites, wakeupWrites
Methods 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:SslChannel
Start 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:
startHandshake
in interfaceSslChannel
- Throws:
IOException
- if an I/O error occurs
-
getSslSession
Description copied from interface:SslChannel
Get the currentSSLSession
for this channel.- Specified by:
getSslSession
in interfaceSslChannel
- Returns:
- the current
SSLSession
-
getHandshakeSetter
Description copied from interface:SslChannel
Get the setter which can be used to change the handshake listener for this channel.- Specified by:
getHandshakeSetter
in interfaceSslChannel
- Returns:
- the setter
-
getCloseSetter
Description copied from interface:StreamChannel
Get 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:
getCloseSetter
in interfaceBoundChannel
- Specified by:
getCloseSetter
in interfaceCloseableChannel
- Specified by:
getCloseSetter
in interfaceConnectedChannel
- Specified by:
getCloseSetter
in interfaceConnectedSslStreamChannel
- Specified by:
getCloseSetter
in interfaceConnectedStreamChannel
- Specified by:
getCloseSetter
in interfaceSslChannel
- Specified by:
getCloseSetter
in interfaceStreamChannel
- Specified by:
getCloseSetter
in interfaceStreamSinkChannel
- Specified by:
getCloseSetter
in interfaceStreamSourceChannel
- Specified by:
getCloseSetter
in interfaceSuspendableChannel
- Specified by:
getCloseSetter
in interfaceSuspendableReadChannel
- Specified by:
getCloseSetter
in interfaceSuspendableWriteChannel
- Overrides:
getCloseSetter
in classAssembledConnectedStreamChannel
- Returns:
- the setter
-
getReadSetter
Description copied from interface:StreamChannel
Get the setter which can be used to change the read listener for this channel.- Specified by:
getReadSetter
in interfaceConnectedSslStreamChannel
- Specified by:
getReadSetter
in interfaceConnectedStreamChannel
- Specified by:
getReadSetter
in interfaceStreamChannel
- Specified by:
getReadSetter
in interfaceStreamSourceChannel
- Specified by:
getReadSetter
in interfaceSuspendableChannel
- Specified by:
getReadSetter
in interfaceSuspendableReadChannel
- Overrides:
getReadSetter
in classAssembledConnectedStreamChannel
- Returns:
- the setter
-
getWriteSetter
Description copied from interface:StreamChannel
Get the setter which can be used to change the write listener for this channel.- Specified by:
getWriteSetter
in interfaceConnectedSslStreamChannel
- Specified by:
getWriteSetter
in interfaceConnectedStreamChannel
- Specified by:
getWriteSetter
in interfaceStreamChannel
- Specified by:
getWriteSetter
in interfaceStreamSinkChannel
- Specified by:
getWriteSetter
in interfaceSuspendableChannel
- Specified by:
getWriteSetter
in interfaceSuspendableWriteChannel
- Overrides:
getWriteSetter
in classAssembledConnectedStreamChannel
- Returns:
- the setter
-