From 8918a772bf10b661eae3eb28b6bb5923b1d8bd4d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Simon=20Basl=C3=A9?= Date: Fri, 5 Jul 2024 16:39:31 +0200 Subject: [PATCH] Polishing See gh-32097 --- .../reactive/bootstrap/JettyCoreHttpServer.java | 2 +- .../socket/client/JettyWebSocketClient.java | 17 ++++++++++++++++- .../JettyCoreRequestUpgradeStrategy.java | 3 ++- 3 files changed, 19 insertions(+), 3 deletions(-) diff --git a/spring-web/src/testFixtures/java/org/springframework/web/testfixture/http/server/reactive/bootstrap/JettyCoreHttpServer.java b/spring-web/src/testFixtures/java/org/springframework/web/testfixture/http/server/reactive/bootstrap/JettyCoreHttpServer.java index 488e0e429ef..963924f1252 100644 --- a/spring-web/src/testFixtures/java/org/springframework/web/testfixture/http/server/reactive/bootstrap/JettyCoreHttpServer.java +++ b/spring-web/src/testFixtures/java/org/springframework/web/testfixture/http/server/reactive/bootstrap/JettyCoreHttpServer.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2023 the original author or authors. + * Copyright 2002-2024 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-webflux/src/main/java/org/springframework/web/reactive/socket/client/JettyWebSocketClient.java b/spring-webflux/src/main/java/org/springframework/web/reactive/socket/client/JettyWebSocketClient.java index bc770de6814..c3eebb65bf2 100644 --- a/spring-webflux/src/main/java/org/springframework/web/reactive/socket/client/JettyWebSocketClient.java +++ b/spring-webflux/src/main/java/org/springframework/web/reactive/socket/client/JettyWebSocketClient.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2022 the original author or authors. + * Copyright 2002-2024 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -39,14 +39,29 @@ import org.springframework.web.reactive.socket.WebSocketHandler; import org.springframework.web.reactive.socket.adapter.JettyWebSocketHandlerAdapter; import org.springframework.web.reactive.socket.adapter.JettyWebSocketSession; +/** + * A {@link WebSocketClient} implementation for use with Jetty 12 + * {@link org.eclipse.jetty.websocket.client.WebSocketClient}. + * + * @author Lachlan Roberts + * @since 6.2 + */ public class JettyWebSocketClient implements WebSocketClient, Lifecycle { private final org.eclipse.jetty.websocket.client.WebSocketClient client; + /** + * Default constructor that creates and manages an instance of a Jetty + * {@link org.eclipse.jetty.websocket.client.WebSocketClient WebSocketClient}. + */ public JettyWebSocketClient() { this(new org.eclipse.jetty.websocket.client.WebSocketClient()); } + /** + * Constructor that accepts an existing instance of a Jetty + * {@link org.eclipse.jetty.websocket.client.WebSocketClient WebSocketClient}. + */ public JettyWebSocketClient(org.eclipse.jetty.websocket.client.WebSocketClient client) { this.client = client; } diff --git a/spring-webflux/src/main/java/org/springframework/web/reactive/socket/server/upgrade/JettyCoreRequestUpgradeStrategy.java b/spring-webflux/src/main/java/org/springframework/web/reactive/socket/server/upgrade/JettyCoreRequestUpgradeStrategy.java index 509981c6dce..c8e3b8484a3 100644 --- a/spring-webflux/src/main/java/org/springframework/web/reactive/socket/server/upgrade/JettyCoreRequestUpgradeStrategy.java +++ b/spring-webflux/src/main/java/org/springframework/web/reactive/socket/server/upgrade/JettyCoreRequestUpgradeStrategy.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2023 the original author or authors. + * Copyright 2002-2024 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -48,6 +48,7 @@ import org.springframework.web.server.ServerWebExchange; * A WebSocket {@code RequestUpgradeStrategy} for Jetty 12 Core. * * @author Rossen Stoyanchev + * @author Greg Wilkins * @since 5.3.4 */ public class JettyCoreRequestUpgradeStrategy implements RequestUpgradeStrategy {