public final class JsseSslStreamConnection extends SslConnection
CloseListenerSettable.Setter<C extends Channel>
thread
EMPTY
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.
|
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.
|
getCloseSetter
getCloseListener, getSinkChannel, getSourceChannel, setCloseListener, setSinkConduit, setSourceConduit
close, getIoThread, getLocalAddress, getPeerAddress, getWorker, isOpen, isReadShutdown, isWriteShutdown
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getPeerAddress
getLocalAddress
close, getIoThread, getWorker
public 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 SslChannel
startHandshake
in class SslConnection
IOException
- if an I/O error occurspublic SocketAddress getPeerAddress()
public SocketAddress getLocalAddress()
protected void closeAction() throws IOException
closeAction
in class Connection
IOException
- if close failsprotected void notifyWriteClosed()
notifyWriteClosed
in class Connection
protected void notifyReadClosed()
notifyReadClosed
in class Connection
public <T> T setOption(Option<T> option, T value) throws IllegalArgumentException, IOException
setOption
in interface Configurable
setOption
in class Connection
T
- 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 Configurable
getOption
in class Connection
T
- 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 Configurable
supportsOption
in class Connection
option
- the optiontrue
if it is supportedpublic SSLSession getSslSession()
SSLSession
for this channel.getSslSession
in interface SslChannel
getSslSession
in class SslConnection
SSLSession
public ChannelListener.Setter<? extends SslConnection> getHandshakeSetter()
SslConnection
getHandshakeSetter
in interface SslChannel
getHandshakeSetter
in class SslConnection
protected boolean readClosed()
Connection
readClosed
in class Connection
true
if read closure was successfully indicated; false
if this method has already been calledprotected boolean writeClosed()
Connection
writeClosed
in class Connection
true
if write closure was successfully indicated; false
if this method has already been calledprotected void handleHandshakeFinished()
Copyright © 2021 JBoss by Red Hat. All rights reserved.