public final class JsseSslStreamConnection extends SslConnection
CloseListenerSettable.Setter<C extends Channel>threadEMPTY| Constructor and Description |
|---|
JsseSslStreamConnection(StreamConnection connection,
SSLEngine sslEngine,
boolean startTls) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
closeAction()
The close action to perform on this connection.
|
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. |
protected void |
handleHandshakeFinished()
Callback method for notification of handshake finished.
|
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.
|
protected boolean |
readClosed()
Indicate that reads have been closed on this connection.
|
<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.
|
protected boolean |
writeClosed()
Indicate that writes have been closed on this connection.
|
getCloseSettergetCloseListener, getSinkChannel, getSourceChannel, setCloseListener, setSinkConduit, setSourceConduitclose, getIoThread, getLocalAddress, getPeerAddress, getWorker, isOpenclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetPeerAddressgetLocalAddressclose, getIoThread, getWorkerpublic JsseSslStreamConnection(StreamConnection connection, SSLEngine sslEngine, boolean startTls)
public void startHandshake()
throws IOException
Options.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 SocketAddress getPeerAddress()
public SocketAddress getLocalAddress()
protected void closeAction()
throws IOException
closeAction in class ConnectionIOException - if close failsprotected void notifyWriteClosed()
notifyWriteClosed in class StreamConnectionprotected void notifyReadClosed()
notifyReadClosed in class StreamConnectionpublic <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 SSLSession getSslSession()
SSLSession for this channel.getSslSession in interface SslChannelgetSslSession in class SslConnectionSSLSessionpublic ChannelListener.Setter<? extends SslConnection> getHandshakeSetter()
SslConnectiongetHandshakeSetter in interface SslChannelgetHandshakeSetter in class SslConnectionprotected boolean readClosed()
ConnectionreadClosed in class Connectiontrue if read closure was successfully indicated; false if this method has already been calledprotected boolean writeClosed()
ConnectionwriteClosed in class Connectiontrue if write closure was successfully indicated; false if this method has already been calledprotected void handleHandshakeFinished()
public boolean isReadShutdown()
ConnectionisReadShutdown in class Connectiontrue if reads were shut downpublic boolean isWriteShutdown()
isWriteShutdown in class Connectiontrue if writes were shut downCopyright © 2017 JBoss, a division of Red Hat, Inc.