public final class NettyPipelineSslUtils
extends java.lang.Object
ChannelPipeline and SSL/TLS.| Modifier and Type | Method and Description |
|---|---|
static javax.net.ssl.SSLSession |
extractSslSession(io.netty.channel.ChannelPipeline pipeline,
io.netty.handler.ssl.SslHandshakeCompletionEvent sslEvent,
java.util.function.Consumer<java.lang.Throwable> failureConsumer)
Extract the
SSLSession from the ChannelPipeline if the SslHandshakeCompletionEvent
is successful. |
static boolean |
isSslEnabled(io.netty.channel.ChannelPipeline pipeline)
Determine if the
ChannelPipeline is configured for SSL/TLS. |
public static boolean isSslEnabled(io.netty.channel.ChannelPipeline pipeline)
ChannelPipeline is configured for SSL/TLS.pipeline - The pipeline to check.true if the pipeline is configured to use SSL/TLS.@Nullable
public static javax.net.ssl.SSLSession extractSslSession(io.netty.channel.ChannelPipeline pipeline,
io.netty.handler.ssl.SslHandshakeCompletionEvent sslEvent,
java.util.function.Consumer<java.lang.Throwable> failureConsumer)
SSLSession from the ChannelPipeline if the SslHandshakeCompletionEvent
is successful.pipeline - the ChannelPipeline which contains handler containing the SSLSession.sslEvent - the event indicating a SSL/TLS handshake completed.failureConsumer - invoked if a failure is encountered.SSLSession or null if none can be found.