Class HttpsContextBuilder
java.lang.Object
org.sourcelab.kafka.connect.apiclient.rest.HttpsContextBuilder
Utility for properly configuring the SSL Context based on client configuration settings.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionorg.apache.http.conn.socket.LayeredConnectionSocketFactoryProperly configured SslSocketFactory based on client configuration.protected HostnameVerifierGet HostnameVerifier instance based on client configuration.protected KeyManager[]Based on client configuration, construct KeyManager instances to use.protected SSLContextGet properly configured SSLContext instance based on client configuration.protected String[]Get allowed SSL Protocols.protected TrustManager[]Based on Client Configuration, construct TrustManager instances to use.
-
Constructor Details
-
HttpsContextBuilder
Constructor.- Parameters:
configuration- client configuration instance.
-
-
Method Details
-
createSslSocketFactory
public org.apache.http.conn.socket.LayeredConnectionSocketFactory createSslSocketFactory()Properly configured SslSocketFactory based on client configuration.- Returns:
- SslSocketFactory instance.
-
getHostnameVerifier
Get HostnameVerifier instance based on client configuration.- Returns:
- HostnameVerifier instance.
-
getSslContext
Get properly configured SSLContext instance based on client configuration.- Returns:
- SSLContext instance.
-
getKeyManagers
Based on client configuration, construct KeyManager instances to use.- Returns:
- Array of 0 or more KeyManagers.
-
getTrustManagers
Based on Client Configuration, construct TrustManager instances to use.- Returns:
- Array of 0 or more TrustManager instances.
-
getSslProtocols
Get allowed SSL Protocols.- Returns:
- allowed SslProtocols.
-