public final class JsseSslConnection extends SslConnection
CloseListenerSettable.Setter<C extends java.nio.channels.Channel>threadEMPTY| Constructor and Description |
|---|
JsseSslConnection(StreamConnection streamConnection,
javax.net.ssl.SSLEngine engine) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
closeAction()
The close action to perform on this connection.
|
javax.net.ssl.SSLEngine |
getEngine() |
ChannelListener.Setter<? extends SslConnection> |
getHandshakeSetter()
Get the setter which can be used to change the handshake listener for this channel.
|
java.net.SocketAddress |
getLocalAddress()
Get the local address that this channel is bound to.
|
<T> T |
getOption(Option<T> option)
Get the value of a channel option.
|
java.net.SocketAddress |
getPeerAddress()
Get the peer address of this channel.
|
javax.net.ssl.SSLSession |
getSslSession()
Get the current
SSLSession for this channel. |
boolean |
isOpen() |
boolean |
isReadShutdown()
Determine whether reads have been shut down on this connection.
|
boolean |
isWriteShutdown()
Determine whether writes have been shut down on this connection.
|
protected void |
notifyReadClosed()
Indicate to conduit handlers that reads have been closed.
|
protected void |
notifyWriteClosed()
Indicate to conduit handlers that writes have been closed.
|
<T> T |
setOption(Option<T> option,
T value)
Set an option for this channel.
|
void |
startHandshake()
Start or restart the SSL/TLS handshake.
|
boolean |
supportsOption(Option<?> option)
Determine whether an option is supported on this channel.
|
getCloseSettergetCloseListener, getSinkChannel, getSourceChannel, setCloseListener, setSinkConduit, setSourceConduitclose, getIoThread, getLocalAddress, getPeerAddress, getWorker, readClosed, writeClosedclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetPeerAddressgetLocalAddressclose, getIoThread, getWorkerpublic JsseSslConnection(StreamConnection streamConnection, javax.net.ssl.SSLEngine engine)
public void startHandshake()
throws java.io.IOException
SslConnectionOptions.SSL_STARTTLS option is set as sending or receiving over the channel will automatically
initiate it. This method must not be called while a read or write operation is taking place.startHandshake in interface SslChannelstartHandshake in class SslConnectionjava.io.IOException - if an I/O error occurspublic javax.net.ssl.SSLSession getSslSession()
SslConnectionSSLSession for this channel.getSslSession in interface SslChannelgetSslSession in class SslConnectionSSLSessionprotected void closeAction()
throws java.io.IOException
ConnectioncloseAction in class Connectionjava.io.IOException - if close failsprotected void notifyWriteClosed()
ConnectionnotifyWriteClosed in class Connectionprotected void notifyReadClosed()
ConnectionnotifyReadClosed in class Connectionpublic java.net.SocketAddress getPeerAddress()
ConnectedChannelpublic java.net.SocketAddress getLocalAddress()
BoundChannelpublic ChannelListener.Setter<? extends SslConnection> getHandshakeSetter()
SslConnectiongetHandshakeSetter in interface SslChannelgetHandshakeSetter in class SslConnectionpublic <T> T setOption(Option<T> option, T value) throws java.lang.IllegalArgumentException, java.io.IOException
setOption in interface ConfigurablesetOption in class ConnectionT - the type of the option valueoption - the option to setvalue - the value of the option to setjava.lang.IllegalArgumentException - if the value is not acceptable for this optionjava.io.IOException - if an I/O error occurred when modifying the optionpublic <T> T getOption(Option<T> option) throws java.io.IOException
getOption in interface ConfigurablegetOption in class ConnectionT - the type of the option valueoption - the option to getnull if it is not setjava.io.IOException - if an I/O error occurred when reading the optionpublic boolean supportsOption(Option<?> option)
supportsOption in interface ConfigurablesupportsOption in class Connectionoption - the optiontrue if it is supportedpublic boolean isOpen()
isOpen in interface java.nio.channels.ChannelisOpen in class Connectionpublic boolean isWriteShutdown()
ConnectionisWriteShutdown in class Connectiontrue if writes were shut downpublic boolean isReadShutdown()
ConnectionisReadShutdown in class Connectiontrue if reads were shut downpublic javax.net.ssl.SSLEngine getEngine()
Copyright © 2016 JBoss, a division of Red Hat, Inc.