Package org.xnio.channels

# Class AssembledSslChannel

java.lang.Object
org.xnio.channels.AssembledChannel
org.xnio.channels.AssembledConnectedChannel
org.xnio.channels.AssembledSslChannel

All Implemented Interfaces:
  `Closeable`, `AutoCloseable`, `Channel`, `InterruptibleChannel`, `BoundChannel`, `CloseableChannel`, `Configurable`, `ConnectedChannel`, `SslChannel`

public class AssembledSslChannel extends AssembledConnectedChannel implements SslChannel
An assembled SSL channel.

Author:
  David M. Lloyd

## Field Summary

### Fields inherited from interface org.xnio.channels.Configurable

`EMPTY`

## Constructor Summary

Constructors
Constructor
Description
`AssembledSslChannel(SuspendableReadChannel readChannel, SuspendableWriteChannel writeChannel)`
Construct a new instance.

## Method Summary

Modifier and Type
Method
Description
`ChannelListener.Setter<? extends AssembledSslChannel>`
`getCloseSetter()`
Get the setter which can be used to change the close listener for this channel.
`ChannelListener.Setter<? extends AssembledSslChannel>`
`getHandshakeSetter()`
Get the setter which can be used to change the handshake listener for this channel.
`SSLSession`
`getSslSession()`
Get the current `SSLSession` for this channel.
`void`
`startHandshake()`
Start or restart the SSL/TLS handshake.

### Methods inherited from class org.xnio.channels.AssembledConnectedChannel

`getLocalAddress, getLocalAddress, getPeerAddress, getPeerAddress`

### Methods inherited from class org.xnio.channels.AssembledChannel

`close, getIoThread, getOption, getWorker, isOpen, setOption, supportsOption`

### 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 java.nio.channels.Channel

`isOpen`

### Methods inherited from interface org.xnio.channels.CloseableChannel

`close, getIoThread, getWorker`

### Methods inherited from interface org.xnio.channels.Configurable

`getOption, setOption, supportsOption`

### Methods inherited from interface org.xnio.channels.ConnectedChannel

`getPeerAddress, getPeerAddress`

## Constructor Details

### AssembledSslChannel

public AssembledSslChannel(SuspendableReadChannel readChannel, SuspendableWriteChannel writeChannel)
Construct a new instance. At least one side must be an SSL channel.

Parameters:
  `readChannel` - the read channel
  `writeChannel` - the write channel

## 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 AssembledSslChannel> 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 AssembledSslChannel> getCloseSetter()
Description copied from interface: `CloseableChannel`
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 `SslChannel`
Overrides:
  `getCloseSetter` in class `AssembledConnectedChannel`
Returns:
  the setter