Package org.xnio.ssl

# Class XnioSsl

java.lang.Object
org.xnio.ssl.XnioSsl

Direct Known Subclasses:
  `JsseXnioSsl`

public abstract class XnioSsl extends Object
An SSL provider for XNIO.

Author:
  David M. Lloyd, Flavia Rainone

## Field Summary

Fields
Modifier and Type
Field
Description
`protected final SSLContext`
`sslContext`
The SSL context for this instance.
`protected final Xnio`
`xnio`
The corresponding XNIO instance.

## Constructor Summary

Constructors
Modifier
Constructor
Description
`protected`
`XnioSsl(Xnio xnio, SSLContext sslContext, OptionMap optionMap)`
Construct a new instance.

## Method Summary

Modifier and Type
Method
Description
`abstract IoFuture<ConnectedSslStreamChannel>`
`connectSsl(XnioWorker worker, InetSocketAddress bindAddress, InetSocketAddress destination, ChannelListener<? super ConnectedSslStreamChannel> openListener, ChannelListener<? super BoundChannel> bindListener, OptionMap optionMap)`
Deprecated.
`IoFuture<ConnectedSslStreamChannel>`
`connectSsl(XnioWorker worker, InetSocketAddress bindAddress, InetSocketAddress destination, ChannelListener<? super ConnectedSslStreamChannel> openListener, OptionMap optionMap)`
Deprecated.
`IoFuture<ConnectedSslStreamChannel>`
`connectSsl(XnioWorker worker, InetSocketAddress destination, ChannelListener<? super ConnectedSslStreamChannel> openListener, ChannelListener<? super BoundChannel> bindListener, OptionMap optionMap)`
Deprecated.
`IoFuture<ConnectedSslStreamChannel>`
`connectSsl(XnioWorker worker, InetSocketAddress destination, ChannelListener<? super ConnectedSslStreamChannel> openListener, OptionMap optionMap)`
Deprecated.
`abstract AcceptingChannel<SslConnection>`
`createSslConnectionServer(XnioWorker worker, InetSocketAddress bindAddress, ChannelListener<? super AcceptingChannel<SslConnection>> acceptListener, OptionMap optionMap)`
Create a bound TCP SSL server.
`abstract AcceptingChannel<ConnectedSslStreamChannel>`
`createSslTcpServer(XnioWorker worker, InetSocketAddress bindAddress, ChannelListener<? super AcceptingChannel<ConnectedSslStreamChannel>> acceptListener, OptionMap optionMap)`
Deprecated.
`abstract IoFuture<SslConnection>`
`openSslConnection(XnioIoThread ioThread, InetSocketAddress bindAddress, InetSocketAddress destination, ChannelListener<? super SslConnection> openListener, ChannelListener<? super BoundChannel> bindListener, OptionMap optionMap)`
Create an SSL connection to a remote host.
`IoFuture<SslConnection>`
`openSslConnection(XnioIoThread ioThread, InetSocketAddress bindAddress, InetSocketAddress destination, ChannelListener<? super SslConnection> openListener, OptionMap optionMap)`
Create an SSL connection to a remote host.
`IoFuture<SslConnection>`
`openSslConnection(XnioIoThread ioThread, InetSocketAddress destination, ChannelListener<? super SslConnection> openListener, ChannelListener<? super BoundChannel> bindListener, OptionMap optionMap)`
Create an SSL connection to a remote host.
`IoFuture<SslConnection>`
`openSslConnection(XnioIoThread ioThread, InetSocketAddress destination, ChannelListener<? super SslConnection> openListener, OptionMap optionMap)`
Create an SSL connection to a remote host.
`abstract IoFuture<SslConnection>`
`openSslConnection(XnioWorker worker, InetSocketAddress bindAddress, InetSocketAddress destination, ChannelListener<? super SslConnection> openListener, ChannelListener<? super BoundChannel> bindListener, OptionMap optionMap)`
Create an SSL connection to a remote host.
`IoFuture<SslConnection>`
`openSslConnection(XnioWorker worker, InetSocketAddress bindAddress, InetSocketAddress destination, ChannelListener<? super SslConnection> openListener, OptionMap optionMap)`
Create an SSL connection to a remote host.
`IoFuture<SslConnection>`
`openSslConnection(XnioWorker worker, InetSocketAddress destination, ChannelListener<? super SslConnection> openListener, ChannelListener<? super BoundChannel> bindListener, OptionMap optionMap)`
Create an SSL connection to a remote host.
`IoFuture<SslConnection>`
`openSslConnection(XnioWorker worker, InetSocketAddress destination, ChannelListener<? super SslConnection> openListener, OptionMap optionMap)`
Create an SSL connection to a remote host.

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Field Details

### xnio

protected final Xnio xnio
The corresponding XNIO instance.

### sslContext

protected final SSLContext sslContext
The SSL context for this instance.

## Constructor Details

### XnioSsl

protected XnioSsl(Xnio xnio, SSLContext sslContext, OptionMap optionMap)
Construct a new instance.

Parameters:
  `xnio` - the XNIO instance
  `sslContext` -
  `optionMap` - the option map to configure this provider

## Method Details

### connectSsl

@Deprecated public IoFuture<ConnectedSslStreamChannel> connectSsl(XnioWorker worker, InetSocketAddress destination, ChannelListener<? super ConnectedSslStreamChannel> openListener, OptionMap optionMap)
Deprecated.
Create an SSL connection to a remote host.

Parameters:
  `worker` - the worker to use
  `destination` - the destination connection address
  `openListener` - the initial open-connection listener
  `optionMap` - the option map
Returns:
  the SSL connection

### connectSsl

@Deprecated public IoFuture<ConnectedSslStreamChannel> connectSsl(XnioWorker worker, InetSocketAddress destination, ChannelListener<? super ConnectedSslStreamChannel> openListener, ChannelListener<? super BoundChannel> bindListener, OptionMap optionMap)
Deprecated.
Create an SSL connection to a remote host.

Parameters:
  `worker` - the worker to use
  `destination` - the destination connection address
  `openListener` - the initial open-connection listener
  `bindListener` - the bind listener
  `optionMap` - the option map
Returns:
  the SSL connection

### connectSsl

@Deprecated public IoFuture<ConnectedSslStreamChannel> connectSsl(XnioWorker worker, InetSocketAddress bindAddress, InetSocketAddress destination, ChannelListener<? super ConnectedSslStreamChannel> openListener, OptionMap optionMap)
Deprecated.
Create an SSL connection to a remote host.

Parameters:
  `worker` - the worker to use
  `bindAddress` - the local bind address
  `destination` - the destination connection address
  `openListener` - the initial open-connection listener
  `optionMap` - the option map
Returns:
  the SSL connection

### connectSsl

@Deprecated public abstract IoFuture<ConnectedSslStreamChannel> connectSsl(XnioWorker worker, InetSocketAddress bindAddress, InetSocketAddress destination, ChannelListener<? super ConnectedSslStreamChannel> openListener, ChannelListener<? super BoundChannel> bindListener, OptionMap optionMap)
Deprecated.
Create an SSL connection to a remote host.

Parameters:
  `worker` - the worker to use
  `bindAddress` - the local bind address
  `destination` - the destination connection address
  `openListener` - the initial open-connection listener
  `bindListener` - the bind listener
  `optionMap` - the option map
Returns:
  the SSL connection

### openSslConnection

public IoFuture<SslConnection> openSslConnection(XnioWorker worker, InetSocketAddress destination, ChannelListener<? super SslConnection> openListener, OptionMap optionMap)
Create an SSL connection to a remote host.

Parameters:
  `worker` - the worker to use
  `destination` - the destination connection address
  `openListener` - the initial open-connection listener
  `optionMap` - the option map
Returns:
  the SSL connection

### openSslConnection

public IoFuture<SslConnection> openSslConnection(XnioIoThread ioThread, InetSocketAddress destination, ChannelListener<? super SslConnection> openListener, OptionMap optionMap)
Create an SSL connection to a remote host.

Parameters:
  `ioThread` - the IO thread to use
  `destination` - the destination connection address
  `openListener` - the initial open-connection listener
  `optionMap` - the option map
Returns:
  the SSL connection

### openSslConnection

public IoFuture<SslConnection> openSslConnection(XnioWorker worker, InetSocketAddress destination, ChannelListener<? super SslConnection> openListener, ChannelListener<? super BoundChannel> bindListener, OptionMap optionMap)
Create an SSL connection to a remote host.

Parameters:
  `worker` - the worker to use
  `destination` - the destination connection address
  `openListener` - the initial open-connection listener
  `bindListener` - the bind listener
  `optionMap` - the option map
Returns:
  the SSL connection

### openSslConnection

public IoFuture<SslConnection> openSslConnection(XnioIoThread ioThread, InetSocketAddress destination, ChannelListener<? super SslConnection> openListener, ChannelListener<? super BoundChannel> bindListener, OptionMap optionMap)
Create an SSL connection to a remote host.

Parameters:
  `ioThread` - the IO Thread to use
  `destination` - the destination connection address
  `openListener` - the initial open-connection listener
  `bindListener` - the bind listener
  `optionMap` - the option map
Returns:
  the SSL connection

### openSslConnection

public IoFuture<SslConnection> openSslConnection(XnioWorker worker, InetSocketAddress bindAddress, InetSocketAddress destination, ChannelListener<? super SslConnection> openListener, OptionMap optionMap)
Create an SSL connection to a remote host.

Parameters:
  `worker` - the worker to use
  `bindAddress` - the local bind address
  `destination` - the destination connection address
  `openListener` - the initial open-connection listener
  `optionMap` - the option map
Returns:
  the SSL connection

### openSslConnection

public IoFuture<SslConnection> openSslConnection(XnioIoThread ioThread, InetSocketAddress bindAddress, InetSocketAddress destination, ChannelListener<? super SslConnection> openListener, OptionMap optionMap)
Create an SSL connection to a remote host.

Parameters:
  `ioThread` - the IO Thread to use
  `bindAddress` - the local bind address
  `destination` - the destination connection address
  `openListener` - the initial open-connection listener
  `optionMap` - the option map
Returns:
  the SSL connection

### openSslConnection

public abstract IoFuture<SslConnection> openSslConnection(XnioWorker worker, InetSocketAddress bindAddress, InetSocketAddress destination, ChannelListener<? super SslConnection> openListener, ChannelListener<? super BoundChannel> bindListener, OptionMap optionMap)
Create an SSL connection to a remote host.

Parameters:
  `worker` - the worker to use
  `bindAddress` - the local bind address
  `destination` - the destination connection address
  `openListener` - the initial open-connection listener
  `bindListener` - the bind listener
  `optionMap` - the option map
Returns:
  the SSL connection

### openSslConnection

public abstract IoFuture<SslConnection> openSslConnection(XnioIoThread ioThread, InetSocketAddress bindAddress, InetSocketAddress destination, ChannelListener<? super SslConnection> openListener, ChannelListener<? super BoundChannel> bindListener, OptionMap optionMap)
Create an SSL connection to a remote host.

Parameters:
  `ioThread` - the IO Thread to use
  `bindAddress` - the local bind address
  `destination` - the destination connection address
  `openListener` - the initial open-connection listener
  `bindListener` - the bind listener
  `optionMap` - the option map
Returns:
  the SSL connection

### createSslTcpServer

@Deprecated public abstract AcceptingChannel<ConnectedSslStreamChannel> createSslTcpServer(XnioWorker worker, InetSocketAddress bindAddress, ChannelListener<? super AcceptingChannel<ConnectedSslStreamChannel>> acceptListener, OptionMap optionMap) throws IOException
Deprecated.
Create a bound TCP SSL server.

Parameters:
  `worker` - the worker to use
  `bindAddress` - the address to bind to
  `acceptListener` - the initial accept listener
  `optionMap` - the initial configuration for the server
Returns:
  the unbound TCP SSL server
Throws:
  `IOException` - if the server could not be created

### createSslConnectionServer

public abstract AcceptingChannel<SslConnection> createSslConnectionServer(XnioWorker worker, InetSocketAddress bindAddress, ChannelListener<? super AcceptingChannel<SslConnection>> acceptListener, OptionMap optionMap) throws IOException
Create a bound TCP SSL server.

Parameters:
  `worker` - the worker to use
  `bindAddress` - the address to bind to
  `acceptListener` - the initial accept listener
  `optionMap` - the initial configuration for the server
Returns:
  the unbound TCP SSL server
Throws:
  `IOException` - if the server could not be created