XNIO API 3.0.4.GA

org.xnio.channels
Interface SslChannel

All Superinterfaces:
Channel, Closeable, CloseableChannel, Configurable, InterruptibleChannel
All Known Subinterfaces:
ConnectedSslStreamChannel

public interface SslChannel
extends CloseableChannel

A channel which can use SSL/TLS to negotiate a security layer.


Method Summary
 ChannelListener.Setter<? extends SslChannel> getCloseSetter()
          Get the setter which can be used to change the close listener for this channel.
 ChannelListener.Setter<? extends SslChannel> 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 interface org.xnio.channels.CloseableChannel
close, getWorker
 
Methods inherited from interface java.nio.channels.Channel
isOpen
 
Methods inherited from interface org.xnio.channels.Configurable
getOption, setOption, supportsOption
 

Method Detail

startHandshake

void startHandshake()
                    throws IOException
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.

Throws:
IOException - if an I/O error occurs

getSslSession

SSLSession getSslSession()
Get the current SSLSession for this channel.

Returns:
the current SSLSession

getCloseSetter

ChannelListener.Setter<? extends SslChannel> getCloseSetter()
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 CloseableChannel
Returns:
the setter

getHandshakeSetter

ChannelListener.Setter<? extends SslChannel> getHandshakeSetter()
Get the setter which can be used to change the handshake listener for this channel.

Returns:
the setter

XNIO API 3.0.4.GA

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