Package com.rabbitmq.client.amqp
Interface ConnectionSettings.TlsSettings<T>
- Type Parameters:
T
-
- Enclosing interface:
ConnectionSettings<T>
public static interface ConnectionSettings.TlsSettings<T>
TLS settings.
-
Method Summary
Modifier and TypeMethodDescriptionThe connection builder.Activate hostname verification.hostnameVerification
(boolean hostnameVerification) Whether to activate hostname verification or not.sslContext
(SSLContext sslContext) SSLContext
to use.Convenience method to set aSSLContext
that trusts all servers.
-
Method Details
-
hostnameVerification
ConnectionSettings.TlsSettings<T> hostnameVerification()Activate hostname verification.Activated by default.
- Returns:
- TLS settings
-
hostnameVerification
Whether to activate hostname verification or not.Activated by default.
- Parameters:
hostnameVerification
- activation flag- Returns:
- TLS settings
-
sslContext
SSLContext
to use.- Parameters:
sslContext
- the SSL context to use- Returns:
- TLS settings
-
trustEverything
ConnectionSettings.TlsSettings<T> trustEverything()Convenience method to set aSSLContext
that trusts all servers.When this feature is enabled, no peer verification is performed, which provides no protection against Man-in-the-Middle (MITM) attacks.
Use this only in development and QA environments.
- Returns:
- TLS settings
-
connection
T connection()The connection builder.- Returns:
- connection builder
-