XNIO API 2.0.0.GA

org.jboss.xnio.channels
Interface SslChannel

All Superinterfaces:
java.nio.channels.Channel, java.io.Closeable, CloseableChannel, Configurable
All Known Subinterfaces:
SslTcpChannel

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 handler for this channel.
 javax.net.ssl.SSLSession getSslSession()
          Get the current SSLSession for this channel.
 void startHandshake()
          Start or restart the SSL/TLS handshake.
 
Methods inherited from interface java.nio.channels.Channel
close, isOpen
 
Methods inherited from interface org.jboss.xnio.channels.Configurable
getOption, setOption, supportsOption
 

Method Detail

startHandshake

void startHandshake()
                    throws java.io.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:
java.io.IOException - if an I/O error occurs

getSslSession

javax.net.ssl.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 handler for this channel. If the channel is already closed, then the handler will not be called.

Specified by:
getCloseSetter in interface CloseableChannel
Returns:
the setter

XNIO API 2.0.0.GA

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