public final class JsseSslConnection extends SslConnection
CloseListenerSettable.Setter<C extends Channel>threadEMPTY| Constructor and Description |
|---|
JsseSslConnection(StreamConnection streamConnection,
SSLEngine engine) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
closeAction()
The close action to perform on this connection.
|
SSLEngine |
getEngine() |
ChannelListener.Setter<? extends SslConnection> |
getHandshakeSetter()
Get the setter which can be used to change the handshake listener for this channel.
|
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.
|
SocketAddress |
getPeerAddress()
Get the peer address of this channel.
|
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, SSLEngine engine)
public void startHandshake()
throws 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 SslConnectionIOException - if an I/O error occurspublic SSLSession getSslSession()
SslConnectionSSLSession for this channel.getSslSession in interface SslChannelgetSslSession in class SslConnectionSSLSessionprotected void closeAction()
throws IOException
ConnectioncloseAction in class ConnectionIOException - if close failsprotected void notifyWriteClosed()
ConnectionnotifyWriteClosed in class Connectionprotected void notifyReadClosed()
ConnectionnotifyReadClosed in class Connectionpublic SocketAddress getPeerAddress()
ConnectedChannelpublic SocketAddress getLocalAddress()
BoundChannelpublic ChannelListener.Setter<? extends SslConnection> getHandshakeSetter()
SslConnectiongetHandshakeSetter in interface SslChannelgetHandshakeSetter in class SslConnectionpublic <T> T setOption(Option<T> option, T value) throws IllegalArgumentException, IOException
setOption in interface ConfigurablesetOption in class ConnectionT - the type of the option valueoption - the option to setvalue - the value of the option to setIllegalArgumentException - if the value is not acceptable for this optionIOException - if an I/O error occurred when modifying the optionpublic <T> T getOption(Option<T> option) throws IOException
getOption in interface ConfigurablegetOption in class ConnectionT - the type of the option valueoption - the option to getnull if it is not setIOException - 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 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 SSLEngine getEngine()
Copyright © 2017 JBoss by Red Hat. All rights reserved.