1128 Commits

Author SHA1 Message Date
Taeik Lim
a946fe2bf8 Fix broken link for Server-Sent Events
Signed-off-by: Taeik Lim <sibera21@gmail.com>
Closes gh-34705
2025-04-02 17:43:42 +02:00
Sam Brannen
208d52d852 Introduce Checkstyle rule for separator symbol location 2025-03-19 15:35:44 +01:00
rstoyanchev
7e9ac120ac Deprecate UrlPathHelper in ServletWebSocketHandlerRegistry
Closes gh-34508
2025-02-28 14:39:29 +00:00
rstoyanchev
ceffda7874 Polishing contribution
Closes gh-34362
2025-02-10 11:14:21 +00:00
Jared Wiltshire
49f9b40fba Support RFC 8441 upgrades over HTTP/2 CONNECT
See gh-34362

Signed-off-by: Jared Wiltshire <jazdw@users.noreply.github.com>
2025-02-10 11:14:21 +00:00
rstoyanchev
f477c1653d Allow WebSocket over HTTP CONNECT
Closes gh-34044
2025-02-03 15:28:27 +00:00
Daeho Kwon
7536777a18 Replace hardcoded "Sec-WebSocket-Version" with constant
Closes gh-34319

Signed-off-by: Daeho Kwon <trewq231@naver.com>
2025-02-03 15:06:28 +00:00
rstoyanchev
a6b6d19545 Update localAddress Javadoc in WebSocketSession
Closes gh-34304
2025-01-28 15:36:26 +00:00
Juergen Hoeller
68997d8416 Avoid javadoc references to deprecated types/methods 2024-12-11 16:58:37 +01:00
Sébastien Deleuze
c807fa597f Remove unnecessary HandshakeHandlerRuntimeHints
Those hints are not needed anymore as of Spring Framework 6.1.

Closes gh-34032
2024-12-05 15:44:09 +01:00
Juergen Hoeller
edf7f3cd43 Polishing 2024-12-04 16:41:07 +01:00
Sam Brannen
d92c57f7a5 Merge branch '6.1.x' 2024-11-13 14:23:52 +01:00
Sam Brannen
4d792d0e45 Remove mentions of Joda-Time support
Since Joda-Time support was removed in Spring Framework 6.0, this commit
removes obsolete mentions of Joda-Time in the reference guide and Javadoc.

See gh-27426
Closes gh-33881
2024-11-13 14:16:14 +01:00
Sam Brannen
f427ac383d (Re)suppress deprecation warnings
See gh-33780
2024-10-30 10:52:01 +01:00
Juergen Hoeller
9e3371ef07 Mark ListenableFuture as deprecated for removal
Closes gh-33808
2024-10-29 18:36:40 +01:00
rstoyanchev
92c9b0dc97 Reduce logging for unsent SUBSCRIBE messages
Closes gh-28252
2024-10-16 16:14:10 +01:00
Juergen Hoeller
e89218b39a Merge branch '6.1.x' 2024-10-16 13:46:22 +02:00
Juergen Hoeller
c765d03a59 Use Locale.ROOT consistently for toLower/toUpperCase
Closes gh-33708
2024-10-16 13:44:59 +02:00
rstoyanchev
bdcfbee7df Merge branch '6.1.x' 2024-10-16 12:11:23 +01:00
rstoyanchev
23656aebc6 Use Locale.ROOT consistently for toLower/toUpperCase
See gh-33708
2024-10-16 12:05:54 +01:00
Stéphane Nicoll
beca562ac2 Merge branch '6.1.x' 2024-10-04 10:20:28 +02:00
jun
a668580f77 Use HttpMethod.GET for better readability
See gh-33634
2024-10-04 10:10:58 +02:00
Brian Clozel
8cd2c40860 Improve random source in SockJS server support
Prior to this commit, the SockJs server support would use
`java.util.Random` to send a random value to clients when they request
the `/info` endpoint. Per protocol, clients can use this value as a
source of entropy for generating a random session id.

In practice, this is not used by clients. For example, the SockJS
javascript client is using a cryptographically safe API to generate
session ids.

While this has no concrete effect on known clients, this commit improves
the random source in the server support by switching to
`java.security.SecureRandom`.

Closes gh-33632
2024-10-01 21:29:19 +02:00
Yanming Zhou
8941e2876e Replace 'e.g.' with 'for example' in documentation and comments
Closes gh-33515
2024-09-26 14:11:17 +02:00
rstoyanchev
007a347ade Refine executor description in WebSocketMessageBrokerStats
Closes gh-33104
2024-07-12 17:35:35 +01:00
gregw
0a60c622cc Implement Eclipse Jetty core HTTP handler adapter
This provides an implementation of an HTTP Handler Adapter that is coded
directly to the Eclipse Jetty core API, bypassing any servlet
implementation.

This includes a Jetty implementation of the spring `WebSocketClient`
interface, `JettyWebSocketClient`, using an explicit dependency to the
jetty-websocket-api.

Closes gh-32097

Co-authored-by: Lachlan Roberts <lachlan@webtide.com>
Co-authored-by: Arjen Poutsma <arjen.poutsma@broadcom.com>
2024-07-08 18:36:46 +02:00
Sam Brannen
932ce04541 Stop referring to old Spring versions in Javadoc 2024-07-01 17:50:52 +02:00
Brian Clozel
3b53165574 Expose WebSocketMessageBrokerStats contracts
Prior to this commit, the `WebSocketMessageBrokerStats` would be in
charge of periodically logging WebSocket stats. This class would also
publicly expose each stats type with dedicated methods, as `String`.
This would not allow observation libraries to easily extract information
and turn them into metrics.

This commit introduces new methods exposing the `Stats` types directly
and deprecates the former `String` variants. This will allow
observability libraries like Micrometer to expose this as metrics:

```
MeterRegistry meterRegistry = ...;

Gauge.builder("spring.stomp.frames", stats.getStompSubProtocolStats(),
      StompSubProtocolHandler.Stats::getTotalConnect)
  .tag("type", "CONNECT")
  .description("number of CONNECT frames processed")
  .register(meterRegistry);
```

Closes gh-31604
2024-05-27 16:06:32 +02:00
rstoyanchev
8c9b6e2205 Use default phase 0 for WebSocket messaging
Closes gh-27519
2024-05-21 15:49:38 +01:00
Juergen Hoeller
645556a28c Merge branch '6.1.x' 2024-05-07 15:53:00 +02:00
Juergen Hoeller
4f02be263f Polishing 2024-05-07 15:52:13 +02:00
Juergen Hoeller
3991cae875 Merge branch '6.1.x' 2024-04-23 16:07:46 +02:00
Juergen Hoeller
d151931f86 Skip close lock if acquired by other thread already
Closes gh-32445
2024-04-23 16:06:48 +02:00
Sébastien Deleuze
2fea3d7921 Merge branch '6.1.x' 2024-03-26 15:41:46 +01:00
Sébastien Deleuze
290a41d398 Refine null-safety in more modules
This commit refines the null-safety in all remaining modules
except spring-test.

See gh-32475
2024-03-26 15:39:18 +01:00
Stéphane Nicoll
c1ed504ac1 Avoid classpath scanning in test
This commit updates SpringConfiguratorTests to not rely on classpath
scanning as it could have side effect. In this particular case, the
configuration class that sources the scan is detected again, leading
to bean overriding.

Irrespective of that, adding more code in that package may have side
effect as they could be scanned as well.

Closes gh-32535
2024-03-26 10:41:00 +01:00
Sébastien Deleuze
2b1eb488fc Merge branch '6.1.x' 2024-03-25 11:04:49 +01:00
Sébastien Deleuze
a63ebe7e9d Refine null-safety in spring-web and spring-websocket
See gh-32475
2024-03-25 11:02:44 +01:00
Sam Brannen
7edd4e8e22 Clean up warnings in Gradle build 2024-03-23 09:28:49 +01:00
rstoyanchev
f9883d8bd6 Polishing contribution
Closes gh-31970
2024-03-12 10:43:31 +00:00
rstoyanchev
73ee86c666 Split messages only if configured to do so
See gh-31970
2024-03-12 10:43:31 +00:00
injae-kim
76d00d78db Support splitting STOMP messages in WebSocketStompClient
See gh-31970
2024-03-12 10:43:31 +00:00
Sam Brannen
20be9e150c Polishing 2024-03-09 14:28:01 +01:00
Sam Brannen
122372c580 Spring cleaning: update copyright headers 2024-02-23 12:21:22 +01:00
Sam Brannen
c98bebd6d3 Spring cleaning: add missing @⁠Override annotations 2024-02-23 12:20:11 +01:00
Stéphane Nicoll
f526b23fd7 Harmonize WebSocket message broker to use Executor
This commit harmonizes the configuration of the WebSocket message
broker to use Executor rather than TaskExecutor as only the former
is enforced. This lets custom configuration to use a wider range
of implementations.

Closes gh-32129
2024-02-15 14:59:42 +01:00
rstoyanchev
78f0688ed0 Fix javadoc error
See gh-32205
2024-02-14 16:48:58 +00:00
rstoyanchev
504b7619bd WebSocketMessageBrokerConfigurer allows to configure Lifecycle phase
Closes gh-32205
2024-02-14 16:26:33 +00:00
rstoyanchev
2dd22f64e1 Improve cancellation of read/write inactivity
The cancellation of read and write inactivity tasks was done via
WebSocketHandler#afterConnectionClosed, relying on the WebSocket
library to always invoke the callback.

This change moves the cancellation to the `close` method instead
that in turn is called from DefaultStompSession#resetConnection,
in effect making the cancellation more proactive and aligned with
connection cleanup in DefaultStompSession vs relying on a
subsequent call from the WebSocket library after the connection
is closed.

Closes gh-32195
2024-02-13 11:17:34 +00:00
rstoyanchev
6a5953dca3 Polishing in WebSocketStompClient
See gh-32195
2024-02-13 11:17:34 +00:00