Class NettyPipelineSslUtils
- java.lang.Object
-
- io.servicetalk.transport.netty.internal.NettyPipelineSslUtils
-
public final class NettyPipelineSslUtils extends java.lang.ObjectUtilities forChannelPipelineand SSL/TLS.
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static javax.net.ssl.SSLSessionextractSslSessionAndReport(io.netty.channel.ChannelPipeline pipeline, io.netty.handler.ssl.SslHandshakeCompletionEvent sslEvent, java.util.function.Consumer<java.lang.Throwable> failureConsumer, boolean shouldReport)Extracts theSSLSessionfrom theChannelPipelineif theSslHandshakeCompletionEventis successful and reports the result toConnectionObserver.SecurityHandshakeObserverif available.static booleanisSslEnabled(io.netty.channel.ChannelPipeline pipeline)Determine if theChannelPipelineis configured for SSL/TLS.
-
-
-
Method Detail
-
isSslEnabled
public static boolean isSslEnabled(io.netty.channel.ChannelPipeline pipeline)
Determine if theChannelPipelineis configured for SSL/TLS.- Parameters:
pipeline- The pipeline to check.- Returns:
trueif the pipeline is configured to use SSL/TLS.
-
extractSslSessionAndReport
@Nullable public static javax.net.ssl.SSLSession extractSslSessionAndReport(io.netty.channel.ChannelPipeline pipeline, io.netty.handler.ssl.SslHandshakeCompletionEvent sslEvent, java.util.function.Consumer<java.lang.Throwable> failureConsumer, boolean shouldReport)Extracts theSSLSessionfrom theChannelPipelineif theSslHandshakeCompletionEventis successful and reports the result toConnectionObserver.SecurityHandshakeObserverif available.- Parameters:
pipeline- theChannelPipelinewhich contains handler containing theSSLSession.sslEvent- the event indicating a SSL/TLS handshake completed.failureConsumer- invoked if a failure is encountered.shouldReport-trueif the handshake status should be reported toConnectionObserver.SecurityHandshakeObserver.- Returns:
- The
SSLSessionornullif none can be found.
-
-