XNIO API 3.1.0.Beta1

org.xnio.ssl
Class XnioSsl

java.lang.Object
  extended by org.xnio.ssl.XnioSsl
Direct Known Subclasses:
JsseXnioSsl

public abstract class XnioSsl
extends Object

An SSL provider for XNIO.

Author:
David M. Lloyd

Field Summary
protected  SSLContext sslContext
          The SSL context for this instance.
protected  Xnio xnio
          The corresponding XNIO instance.
 
Constructor Summary
protected XnioSsl(Xnio xnio, SSLContext sslContext, OptionMap optionMap)
          Construct a new instance.
 
Method Summary
abstract  IoFuture<ConnectedSslStreamChannel> connectSsl(XnioWorker worker, InetSocketAddress destination, ChannelListener<? super ConnectedSslStreamChannel> openListener, ChannelListener<? super BoundChannel> bindListener, OptionMap optionMap)
          Create an SSL connection to a remote host.
abstract  IoFuture<ConnectedSslStreamChannel> connectSsl(XnioWorker worker, InetSocketAddress destination, ChannelListener<? super ConnectedSslStreamChannel> openListener, OptionMap optionMap)
          Create an SSL connection to a remote host.
abstract  IoFuture<ConnectedSslStreamChannel> connectSsl(XnioWorker worker, InetSocketAddress bindAddress, InetSocketAddress destination, ChannelListener<? super ConnectedSslStreamChannel> openListener, ChannelListener<? super BoundChannel> bindListener, OptionMap optionMap)
          Create an SSL connection to a remote host.
abstract  IoFuture<ConnectedSslStreamChannel> connectSsl(XnioWorker worker, InetSocketAddress bindAddress, InetSocketAddress destination, ChannelListener<? super ConnectedSslStreamChannel> openListener, OptionMap optionMap)
          Create an SSL connection to a remote host.
abstract  AcceptingChannel<ConnectedSslStreamChannel> createSslTcpServer(XnioWorker worker, InetSocketAddress bindAddress, ChannelListener<? super AcceptingChannel<ConnectedSslStreamChannel>> acceptListener, OptionMap optionMap)
          Create a bound TCP SSL server.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

xnio

protected final Xnio xnio
The corresponding XNIO instance.


sslContext

protected final SSLContext sslContext
The SSL context for this instance.

Constructor Detail

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 Detail

connectSsl

public abstract IoFuture<ConnectedSslStreamChannel> connectSsl(XnioWorker worker,
                                                               InetSocketAddress destination,
                                                               ChannelListener<? super ConnectedSslStreamChannel> 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

connectSsl

public abstract IoFuture<ConnectedSslStreamChannel> connectSsl(XnioWorker worker,
                                                               InetSocketAddress destination,
                                                               ChannelListener<? super ConnectedSslStreamChannel> 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

connectSsl

public abstract IoFuture<ConnectedSslStreamChannel> connectSsl(XnioWorker worker,
                                                               InetSocketAddress bindAddress,
                                                               InetSocketAddress destination,
                                                               ChannelListener<? super ConnectedSslStreamChannel> 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

connectSsl

public abstract IoFuture<ConnectedSslStreamChannel> connectSsl(XnioWorker worker,
                                                               InetSocketAddress bindAddress,
                                                               InetSocketAddress destination,
                                                               ChannelListener<? super ConnectedSslStreamChannel> 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

createSslTcpServer

public abstract AcceptingChannel<ConnectedSslStreamChannel> createSslTcpServer(XnioWorker worker,
                                                                               InetSocketAddress bindAddress,
                                                                               ChannelListener<? super AcceptingChannel<ConnectedSslStreamChannel>> acceptListener,
                                                                               OptionMap optionMap)
                                                                        throws IOException
Create a bound TCP SSL server. The given executor will be used to execute SSL tasks.

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

XNIO API 3.1.0.Beta1

Copyright © 2010 JBoss, a division of Red Hat, Inc.