Top Description Fields Constructors Methods
org.xnio.ssl

public abstract Class XnioSsl

extends Object
Class Inheritance
Known Direct Subclasses
org.xnio.ssl.JsseXnioSsl
Annotations
@SuppressWarnings:unused
Imports
java.io.IOException, java.net.InetSocketAddress, javax.net.ssl.SSLContext, org.xnio.ChannelListener, .IoFuture, .OptionMap, .Xnio, .XnioIoThread, .XnioWorker, org.xnio.channels.AcceptingChannel, .BoundChannel, .ConnectedSslStreamChannel

An SSL provider for XNIO.
Authors
David M. Lloyd, Flavia Rainone

Field Summary

Modifier and TypeField and Description
private static final InetSocketAddress
protected final SSLContext
sslContext

The SSL context for this instance.

protected final Xnio
xnio

The corresponding XNIO instance.

Constructor Summary

AccessConstructor and Description
protected
XnioSsl(final Xnio
the XNIO instance
xnio
,
final SSLContext sslContext, final OptionMap
the option map to configure this provider
optionMap
)

Construct a new instance.

Method Summary

Modifier and TypeMethod and Description
public IoFuture<ConnectedSslStreamChannel>

Returns:

the SSL connection
connectSsl
(XnioWorker
the worker to use
worker
,
InetSocketAddress
the destination connection address
destination
,
ChannelListener<? super ConnectedSslStreamChannel>
the initial open-connection listener
openListener
,
OptionMap
the option map
optionMap
)
Deprecated

Create an SSL connection to a remote host.

public IoFuture<ConnectedSslStreamChannel>

Returns:

the SSL connection
connectSsl
(final XnioWorker
the worker to use
worker
,
final InetSocketAddress
the destination connection address
destination
,
final ChannelListener<? super ConnectedSslStreamChannel>
the initial open-connection listener
openListener
,
final ChannelListener<? super BoundChannel>
the bind listener
bindListener
,
final OptionMap
the option map
optionMap
)
Deprecated

Create an SSL connection to a remote host.

public IoFuture<ConnectedSslStreamChannel>

Returns:

the SSL connection
connectSsl
(final XnioWorker
the worker to use
worker
,
final InetSocketAddress
the local bind address
bindAddress
,
final InetSocketAddress
the destination connection address
destination
,
final ChannelListener<? super ConnectedSslStreamChannel>
the initial open-connection listener
openListener
,
final OptionMap
the option map
optionMap
)
Deprecated

Create an SSL connection to a remote host.

public abstract IoFuture<ConnectedSslStreamChannel>

Returns:

the SSL connection
connectSsl
(XnioWorker
the worker to use
worker
,
InetSocketAddress
the local bind address
bindAddress
,
InetSocketAddress
the destination connection address
destination
,
ChannelListener<? super ConnectedSslStreamChannel>
the initial open-connection listener
openListener
,
ChannelListener<? super BoundChannel>
the bind listener
bindListener
,
OptionMap
the option map
optionMap
)
Deprecated

Create an SSL connection to a remote host.

public abstract AcceptingChannel<SslConnection>

Returns:

the unbound TCP SSL server
createSslConnectionServer
(XnioWorker
the worker to use
worker
,
InetSocketAddress
the address to bind to
bindAddress
,
ChannelListener<? super AcceptingChannel<SslConnection>>
the initial accept listener
acceptListener
,
OptionMap
the initial configuration for the server
optionMap
)

Create a bound TCP SSL server.

public abstract AcceptingChannel<ConnectedSslStreamChannel>

Returns:

the unbound TCP SSL server
createSslTcpServer
(XnioWorker
the worker to use
worker
,
InetSocketAddress
the address to bind to
bindAddress
,
ChannelListener<? super AcceptingChannel<ConnectedSslStreamChannel>>
the initial accept listener
acceptListener
,
OptionMap
the initial configuration for the server
optionMap
)
Deprecated

Create a bound TCP SSL server.

public IoFuture<SslConnection>

Returns:

the SSL connection
openSslConnection
(XnioWorker
the worker to use
worker
,
InetSocketAddress
the destination connection address
destination
,
ChannelListener<? super SslConnection>
the initial open-connection listener
openListener
,
OptionMap
the option map
optionMap
)

Create an SSL connection to a remote host.

public IoFuture<SslConnection>

Returns:

the SSL connection
openSslConnection
(XnioIoThread
the IO thread to use
ioThread
,
InetSocketAddress
the destination connection address
destination
,
ChannelListener<? super SslConnection>
the initial open-connection listener
openListener
,
OptionMap
the option map
optionMap
)

Create an SSL connection to a remote host.

public IoFuture<SslConnection>

Returns:

the SSL connection
openSslConnection
(final XnioWorker
the worker to use
worker
,
final InetSocketAddress
the destination connection address
destination
,
final ChannelListener<? super SslConnection>
the initial open-connection listener
openListener
,
final ChannelListener<? super BoundChannel>
the bind listener
bindListener
,
final OptionMap
the option map
optionMap
)

Create an SSL connection to a remote host.

public IoFuture<SslConnection>

Returns:

the SSL connection
openSslConnection
(final XnioIoThread
the IO Thread to use
ioThread
,
final InetSocketAddress
the destination connection address
destination
,
final ChannelListener<? super SslConnection>
the initial open-connection listener
openListener
,
final ChannelListener<? super BoundChannel>
the bind listener
bindListener
,
final OptionMap
the option map
optionMap
)

Create an SSL connection to a remote host.

public IoFuture<SslConnection>

Returns:

the SSL connection
openSslConnection
(final XnioWorker
the worker to use
worker
,
final InetSocketAddress
the local bind address
bindAddress
,
final InetSocketAddress
the destination connection address
destination
,
final ChannelListener<? super SslConnection>
the initial open-connection listener
openListener
,
final OptionMap
the option map
optionMap
)

Create an SSL connection to a remote host.

public IoFuture<SslConnection>

Returns:

the SSL connection
openSslConnection
(final XnioIoThread
the IO Thread to use
ioThread
,
final InetSocketAddress
the local bind address
bindAddress
,
final InetSocketAddress
the destination connection address
destination
,
final ChannelListener<? super SslConnection>
the initial open-connection listener
openListener
,
final OptionMap
the option map
optionMap
)

Create an SSL connection to a remote host.

public abstract IoFuture<SslConnection>

Returns:

the SSL connection
openSslConnection
(XnioWorker
the worker to use
worker
,
InetSocketAddress
the local bind address
bindAddress
,
InetSocketAddress
the destination connection address
destination
,
ChannelListener<? super SslConnection>
the initial open-connection listener
openListener
,
ChannelListener<? super BoundChannel>
the bind listener
bindListener
,
OptionMap
the option map
optionMap
)

Create an SSL connection to a remote host.

public abstract IoFuture<SslConnection>

Returns:

the SSL connection
openSslConnection
(XnioIoThread
the IO Thread to use
ioThread
,
InetSocketAddress
the local bind address
bindAddress
,
InetSocketAddress
the destination connection address
destination
,
ChannelListener<? super SslConnection>
the initial open-connection listener
openListener
,
ChannelListener<? super BoundChannel>
the bind listener
bindListener
,
OptionMap
the option map
optionMap
)

Create an SSL connection to a remote host.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

ANY_INET_ADDRESSback to summary
private static final InetSocketAddress ANY_INET_ADDRESS
sslContextback to summary
protected final SSLContext sslContext

The SSL context for this instance.

xnioback to summary
protected final Xnio xnio

The corresponding XNIO instance.

Constructor Detail

XnioSslback to summary
protected XnioSsl(final Xnio xnio, final SSLContext sslContext, final OptionMap optionMap)

Construct a new instance.

Parameters
xnio:Xnio

the XNIO instance

optionMap:OptionMap

the option map to configure this provider

Annotations
@SuppressWarnings:unused

Method Detail

connectSslback to summary
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:XnioWorker

the worker to use

destination:InetSocketAddress

the destination connection address

openListener:ChannelListener<? super ConnectedSslStreamChannel>

the initial open-connection listener

optionMap:OptionMap

the option map

Returns:IoFuture<ConnectedSslStreamChannel>

the SSL connection

Annotations
@Deprecated
connectSslback to summary
public IoFuture<ConnectedSslStreamChannel> connectSsl(final XnioWorker worker, final InetSocketAddress destination, final ChannelListener<? super ConnectedSslStreamChannel> openListener, final ChannelListener<? super BoundChannel> bindListener, final OptionMap optionMap)

Deprecated

Create an SSL connection to a remote host.

Parameters
worker:XnioWorker

the worker to use

destination:InetSocketAddress

the destination connection address

openListener:ChannelListener<? super ConnectedSslStreamChannel>

the initial open-connection listener

bindListener:ChannelListener<? super BoundChannel>

the bind listener

optionMap:OptionMap

the option map

Returns:IoFuture<ConnectedSslStreamChannel>

the SSL connection

Annotations
@Deprecated
connectSslback to summary
public IoFuture<ConnectedSslStreamChannel> connectSsl(final XnioWorker worker, final InetSocketAddress bindAddress, final InetSocketAddress destination, final ChannelListener<? super ConnectedSslStreamChannel> openListener, final OptionMap optionMap)

Deprecated

Create an SSL connection to a remote host.

Parameters
worker:XnioWorker

the worker to use

bindAddress:InetSocketAddress

the local bind address

destination:InetSocketAddress

the destination connection address

openListener:ChannelListener<? super ConnectedSslStreamChannel>

the initial open-connection listener

optionMap:OptionMap

the option map

Returns:IoFuture<ConnectedSslStreamChannel>

the SSL connection

Annotations
@Deprecated
connectSslback to summary
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:XnioWorker

the worker to use

bindAddress:InetSocketAddress

the local bind address

destination:InetSocketAddress

the destination connection address

openListener:ChannelListener<? super ConnectedSslStreamChannel>

the initial open-connection listener

bindListener:ChannelListener<? super BoundChannel>

the bind listener

optionMap:OptionMap

the option map

Returns:IoFuture<ConnectedSslStreamChannel>

the SSL connection

Annotations
@Deprecated
createSslConnectionServerback to summary
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:XnioWorker

the worker to use

bindAddress:InetSocketAddress

the address to bind to

acceptListener:ChannelListener<? super AcceptingChannel<SslConnection>>

the initial accept listener

optionMap:OptionMap

the initial configuration for the server

Returns:AcceptingChannel<SslConnection>

the unbound TCP SSL server

Exceptions
IOException:
if the server could not be created
createSslTcpServerback to summary
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:XnioWorker

the worker to use

bindAddress:InetSocketAddress

the address to bind to

acceptListener:ChannelListener<? super AcceptingChannel<ConnectedSslStreamChannel>>

the initial accept listener

optionMap:OptionMap

the initial configuration for the server

Returns:AcceptingChannel<ConnectedSslStreamChannel>

the unbound TCP SSL server

Annotations
@Deprecated
Exceptions
IOException:
if the server could not be created
openSslConnectionback to summary
public IoFuture<SslConnection> openSslConnection(XnioWorker worker, InetSocketAddress destination, ChannelListener<? super SslConnection> openListener, OptionMap optionMap)

Create an SSL connection to a remote host.

Parameters
worker:XnioWorker

the worker to use

destination:InetSocketAddress

the destination connection address

openListener:ChannelListener<? super SslConnection>

the initial open-connection listener

optionMap:OptionMap

the option map

Returns:IoFuture<SslConnection>

the SSL connection

openSslConnectionback to summary
public IoFuture<SslConnection> openSslConnection(XnioIoThread ioThread, InetSocketAddress destination, ChannelListener<? super SslConnection> openListener, OptionMap optionMap)

Create an SSL connection to a remote host.

Parameters
ioThread:XnioIoThread

the IO thread to use

destination:InetSocketAddress

the destination connection address

openListener:ChannelListener<? super SslConnection>

the initial open-connection listener

optionMap:OptionMap

the option map

Returns:IoFuture<SslConnection>

the SSL connection

openSslConnectionback to summary
public IoFuture<SslConnection> openSslConnection(final XnioWorker worker, final InetSocketAddress destination, final ChannelListener<? super SslConnection> openListener, final ChannelListener<? super BoundChannel> bindListener, final OptionMap optionMap)

Create an SSL connection to a remote host.

Parameters
worker:XnioWorker

the worker to use

destination:InetSocketAddress

the destination connection address

openListener:ChannelListener<? super SslConnection>

the initial open-connection listener

bindListener:ChannelListener<? super BoundChannel>

the bind listener

optionMap:OptionMap

the option map

Returns:IoFuture<SslConnection>

the SSL connection

openSslConnectionback to summary
public IoFuture<SslConnection> openSslConnection(final XnioIoThread ioThread, final InetSocketAddress destination, final ChannelListener<? super SslConnection> openListener, final ChannelListener<? super BoundChannel> bindListener, final OptionMap optionMap)

Create an SSL connection to a remote host.

Parameters
ioThread:XnioIoThread

the IO Thread to use

destination:InetSocketAddress

the destination connection address

openListener:ChannelListener<? super SslConnection>

the initial open-connection listener

bindListener:ChannelListener<? super BoundChannel>

the bind listener

optionMap:OptionMap

the option map

Returns:IoFuture<SslConnection>

the SSL connection

openSslConnectionback to summary
public IoFuture<SslConnection> openSslConnection(final XnioWorker worker, final InetSocketAddress bindAddress, final InetSocketAddress destination, final ChannelListener<? super SslConnection> openListener, final OptionMap optionMap)

Create an SSL connection to a remote host.

Parameters
worker:XnioWorker

the worker to use

bindAddress:InetSocketAddress

the local bind address

destination:InetSocketAddress

the destination connection address

openListener:ChannelListener<? super SslConnection>

the initial open-connection listener

optionMap:OptionMap

the option map

Returns:IoFuture<SslConnection>

the SSL connection

openSslConnectionback to summary
public IoFuture<SslConnection> openSslConnection(final XnioIoThread ioThread, final InetSocketAddress bindAddress, final InetSocketAddress destination, final ChannelListener<? super SslConnection> openListener, final OptionMap optionMap)

Create an SSL connection to a remote host.

Parameters
ioThread:XnioIoThread

the IO Thread to use

bindAddress:InetSocketAddress

the local bind address

destination:InetSocketAddress

the destination connection address

openListener:ChannelListener<? super SslConnection>

the initial open-connection listener

optionMap:OptionMap

the option map

Returns:IoFuture<SslConnection>

the SSL connection

openSslConnectionback to summary
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:XnioWorker

the worker to use

bindAddress:InetSocketAddress

the local bind address

destination:InetSocketAddress

the destination connection address

openListener:ChannelListener<? super SslConnection>

the initial open-connection listener

bindListener:ChannelListener<? super BoundChannel>

the bind listener

optionMap:OptionMap

the option map

Returns:IoFuture<SslConnection>

the SSL connection

openSslConnectionback to summary
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:XnioIoThread

the IO Thread to use

bindAddress:InetSocketAddress

the local bind address

destination:InetSocketAddress

the destination connection address

openListener:ChannelListener<? super SslConnection>

the initial open-connection listener

bindListener:ChannelListener<? super BoundChannel>

the bind listener

optionMap:OptionMap

the option map

Returns:IoFuture<SslConnection>

the SSL connection