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

Constructors
Constructor
Description
`AssembledConnectedSslStreamChannel(SslChannel sslChannel, StreamSourceChannel source, StreamSinkChannel sink)`
Construct a new instance.
`AssembledConnectedSslStreamChannel(StreamSourceChannel source, StreamSinkChannel sink)`
Construct a new instance.

## Method Summary

Modifier and Type
Method
Description
`ChannelListener.Setter<? extends AssembledConnectedSslStreamChannel>`
`getCloseSetter()`
Get the setter which can be used to change the close listener for this channel.
`ChannelListener.Setter<? extends AssembledConnectedSslStreamChannel>`
`getHandshakeSetter()`
Get the setter which can be used to change the handshake listener for this channel.
`ChannelListener.Setter<? extends AssembledConnectedSslStreamChannel>`
`getReadSetter()`
Get the setter which can be used to change the read listener for this channel.
`SSLSession`
`getSslSession()`
Get the current `SSLSession` for this channel.
`ChannelListener.Setter<? extends AssembledConnectedSslStreamChannel>`
`getWriteSetter()`
Get the setter which can be used to change the write listener for this channel.
`void`
`startHandshake()`
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 channel
  `source` - the source
  `sink` - the sink

### AssembledConnectedSslStreamChannel

public AssembledConnectedSslStreamChannel(StreamSourceChannel source, StreamSinkChannel sink)
Construct a new instance. At least one side must be an SSL channel.

Parameters:
  `source` - the source
  `sink` - the sink

## Method Details

### startHandshake

public void startHandshake() throws IOException
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 interface `SslChannel`
Throws:
  `IOException` - if an I/O error occurs

### getSslSession

public SSLSession getSslSession()
Description copied from interface: `SslChannel`
Get the current `SSLSession` for this channel.

Specified by:
  `getSslSession` in interface `SslChannel`
Returns:
  the current `SSLSession`

### getHandshakeSetter

public ChannelListener.Setter<? extends AssembledConnectedSslStreamChannel> 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 interface `SslChannel`
Returns:
  the setter

### getCloseSetter

public ChannelListener.Setter<? extends AssembledConnectedSslStreamChannel> 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 interface `BoundChannel`
Specified by:
  `getCloseSetter` in interface `CloseableChannel`
Specified by:
  `getCloseSetter` in interface `ConnectedChannel`
Specified by:
  `getCloseSetter` in interface `ConnectedSslStreamChannel`
Specified by:
  `getCloseSetter` in interface `ConnectedStreamChannel`
Specified by:
  `getCloseSetter` in interface `SslChannel`
Specified by:
  `getCloseSetter` in interface `StreamChannel`
Specified by:
  `getCloseSetter` in interface `StreamSinkChannel`
Specified by:
  `getCloseSetter` in interface `StreamSourceChannel`
Specified by:
  `getCloseSetter` in interface `SuspendableChannel`
Specified by:
  `getCloseSetter` in interface `SuspendableReadChannel`
Specified by:
  `getCloseSetter` in interface `SuspendableWriteChannel`
Overrides:
  `getCloseSetter` in class `AssembledConnectedStreamChannel`
Returns:
  the setter

### getReadSetter

public ChannelListener.Setter<? extends AssembledConnectedSslStreamChannel> 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 interface `ConnectedSslStreamChannel`
Specified by:
  `getReadSetter` in interface `ConnectedStreamChannel`
Specified by:
  `getReadSetter` in interface `StreamChannel`
Specified by:
  `getReadSetter` in interface `StreamSourceChannel`
Specified by:
  `getReadSetter` in interface `SuspendableChannel`
Specified by:
  `getReadSetter` in interface `SuspendableReadChannel`
Overrides:
  `getReadSetter` in class `AssembledConnectedStreamChannel`
Returns:
  the setter

### getWriteSetter

public ChannelListener.Setter<? extends AssembledConnectedSslStreamChannel> 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 interface `ConnectedSslStreamChannel`
Specified by:
  `getWriteSetter` in interface `ConnectedStreamChannel`
Specified by:
  `getWriteSetter` in interface `StreamChannel`
Specified by:
  `getWriteSetter` in interface `StreamSinkChannel`
Specified by:
  `getWriteSetter` in interface `SuspendableChannel`
Specified by:
  `getWriteSetter` in interface `SuspendableWriteChannel`
Overrides:
  `getWriteSetter` in class `AssembledConnectedStreamChannel`
Returns:
  the setter