You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: _versions/main/guides/websockets-next-reference.adoc
+27-2Lines changed: 27 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1465,16 +1465,41 @@ class MyBean {
1465
1465
1466
1466
=== Configuring SSL/TLS
1467
1467
1468
-
To establish a TLS connection, you need to configure a _named_ configuration using the xref:./tls-registry-reference.adoc[TLS registry]:
1468
+
To establish a TLS connection, you need to configure a _named_ configuration using the xref:./tls-registry-reference.adoc[TLS registry]. This is typically done via configuration:
Alternatively, you can supply the configuration name using the <<client-connectors,connector>>:
1484
+
1485
+
[source, java]
1486
+
----
1487
+
@Singleton
1488
+
public class MyBean {
1489
+
1490
+
@Inject
1491
+
WebSocketConnector<MyEndpoint> connector;
1474
1492
1475
-
quarkus.websockets-next.client.tls-configuration-name=my-ws-client # Reference the named configuration
1493
+
public void connect() {
1494
+
connector
1495
+
.tlsConfigurationName("my-ws-client")
1496
+
.connectAndAwait();
1497
+
}
1498
+
}
1476
1499
----
1477
1500
1501
+
A name supplied to the connector will override any statically configured name. This can be useful for establishing a default configuration which can be overridden at runtime as necessary.
1502
+
1478
1503
WARNING: When using the WebSocket client, using a _named_ configuration is required to avoid conflicts with other TLS configurations.
1479
1504
The client will not use the default TLS configuration.
0 commit comments