Commit Graph

832 Commits

Author SHA1 Message Date
Juergen Hoeller c385a1de83 Polishing 2018-09-17 15:17:39 +02:00
Juergen Hoeller 34663300a6 Avoid regex pattern matching for simple String replacement steps
Issue: SPR-17279
2018-09-17 14:22:19 +02:00
Rossen Stoyanchev cf9641686b StompSubProtocolHandler allows version 1.0
Issue: SPR-17258
2018-09-13 20:59:22 -04:00
Rossen Stoyanchev 3302798e2f Use random id for WebSocket sessions
Issue: SPR-17228
2018-09-05 19:48:28 -04:00
Sam Brannen a8fbac8472 Polish JavaDoc
Issue: SPR-17174
2018-08-18 18:15:05 +02:00
Juergen Hoeller 84300b796c Fix recent javadoc errors
Issue: SPR-17174
2018-08-16 18:51:31 +02:00
Juergen Hoeller 2ec8fa9cac SmartLifecycle default methods for auto-startup in default phase
Issue: SPR-17188
2018-08-16 12:08:02 +02:00
Rossen Stoyanchev 430065c31d Order property for SimpUserRegistry
Issue:SPR-17142
2018-08-13 11:56:34 +03:00
Sam Brannen cfb1ed1009 Clean up warnings and delete dead code 2018-08-12 15:55:11 +02:00
Rossen Stoyanchev 309ffc6d0d OverflowStrategy in ConcurrentWebSocketSessionDecorator
Issue: SPR-17140
2018-08-10 16:15:21 +03:00
Rossen Stoyanchev 61c52d64c5 Polish ConcurrentWebSocketSessionDecoratorTests 2018-08-10 16:15:21 +03:00
Kazuhiro Sera be211ceead Fix typos detected by github.com/client9/misspell 2018-08-08 12:50:46 +02:00
Juergen Hoeller 2474c48749 Polishing 2018-08-02 16:55:53 +02:00
stsypanov b5c691bdac SPR-17074 Replace pointless wrapping with Arrays.asList with iteration over array 2018-08-02 12:07:00 +02:00
Juergen Hoeller 9b671f8408 Polishing 2018-07-31 23:57:19 +02:00
Сергей Цыпанов f8340838b3 Use lambda expressions for lazy instantiation (#1911)
Issue: SPR-17074
2018-07-31 13:03:18 +02:00
Juergen Hoeller 3881a4aded Polishing 2018-07-25 14:16:02 +02:00
Sebastien Deleuze d3b244a81b Optimize class detection by sharing the ClassLoader
Issue: SPR-17083
2018-07-25 11:09:42 +02:00
Juergen Hoeller 02403f6a34 Polishing 2018-07-24 21:44:43 +02:00
Juergen Hoeller 11881ff211 Polishing 2018-07-24 18:45:52 +02:00
Rossen Stoyanchev 23c379d5c0 Order setter for DefaultSimpUserRegistry
Issue: SPR-17023
2018-07-24 12:23:13 -04:00
Rossen Stoyanchev 7500b144ae Option to preserve publish order
Issue: SPR-13989
2018-07-23 23:24:39 -04:00
Juergen Hoeller 9a43d2ec20 Revised log levels: less WARN and INFO, fine-tuned DEBUG vs TRACE
Issue: SPR-16946
2018-07-20 15:05:16 +02:00
Sebastien Deleuze 3c9049d530 Leverage Jetty BOM
Issue: SPR-17058
2018-07-18 14:49:49 +02:00
Rossen Stoyanchev 3d6e38bb43 Conditional registration of task scheduler for SockJS
Issue: SPR-16189
2018-07-11 11:10:03 -04:00
Rossen Stoyanchev 6aa6d91ea9 Remove deprecated constructors in WebSocket config
In preparation for SPR-16189.
2018-07-11 11:10:03 -04:00
Juergen Hoeller 4ff1e3e74b Consistent abstract declaration for utility classes (plus polishing)
Issue: SPR-16968
2018-07-01 02:31:20 +02:00
Phillip Webb a89e716cc7 Use tabs rather than spaces in tests
Update tests to ensure that tabs are used instead of spaces. Also
consistently apply a new line at the end of each file.

Issue: SPR-16968
2018-06-28 10:28:44 +02:00
Phillip Webb 81451aa800 Organize imports
Reorganize imports to ensure consistent ordering. This commit also
expands any `.*` static imports in favor of using fully-qualified
method references.

Issue: SPR-16968
2018-06-28 10:28:44 +02:00
Phillip Webb 5cedd0d5d4 Consistently use tabs rather than spaces
Update code that has accidentally used spaces instead of tabs.
Also remove all trailing whitespace.

Issue: SPR-16968
2018-06-28 10:28:44 +02:00
Phillip Webb 0b53c1096a Always use 'this.' when accessing fields
Ensure that `this.` is used consistently when accessing class
fields.

Issue: SPR-16968
2018-06-28 10:28:44 +02:00
Phillip Webb eeebd51f57 Use consistent class design
Update all classes so that inner classes are always last. Also
ensure that utility classes are always final and have a private
constructor and make exceptions final whenever possible.

Issue: SPR-16968
2018-06-28 10:28:44 +02:00
Phillip Webb c3a17dfd47 Ensure all files end with a newline
Update all files to ensure that they always end with a new line.

Issue: SPR-16968
2018-06-28 10:28:44 +02:00
Phillip Webb e0480f75ac Fix javadoc checkstyle issues
Fix checkstyle violations for javadoc.

Issue: SPR-16968
2018-06-28 10:28:44 +02:00
Brian Clozel 417354da8a Remove dependency management noise from POMs
Prior to this commit, the generated POMs for Spring Framework modules
would contain unneeded/harmful information from the Spring Framework
build:

1. The BOM imports applied to each module by the dependency
management plugin, for example for Netty or Reactor Netty.
Spring should not export that opinion to its POMs.

2. The exclusion of "org.slf4:jcl-over-slf4j" from *all* dependencies,
which made the POMs much larger than necessary and suggested to
developers that they should exclude it as well when using all those
listed dependencies. In fact, only Apache Tiles currently brings that
transitively.

This commit removes that information from the POMs.
The dependencyManagement Gradle plugin is disabled for POM generation
and we manually resolve the dependency versions during the generation
phase.
The Gradle build is streamlined to exclude "org.slf4:jcl-over-slf4j"
only when necessary.

Issue: SPR-16893
2018-06-11 15:57:54 +02:00
Sebastien Deleuze ac37b678a3 Remove JSONP support
CORS is now widely supported and should be used instead for cross-domain
requests.

Issue: SPR-16914
2018-06-08 12:15:48 +02:00
Rossen Stoyanchev 72b1d4c648 Remove explicit references to Reactor Netty version
...now that 0.8 is also listed in the Reactor bom.

Issue: SPR-16387
2018-06-06 14:35:54 -04:00
Rossen Stoyanchev a3216432b5 Polish
Issue: SPR-16387
2018-05-31 15:38:30 -04:00
Violeta Georgieva ffbc75ae47 Upgrade to Reactor Netty 0.8
Issue: SPR-16387
2018-05-31 15:37:39 -04:00
Rossen Stoyanchev fbf25c536d ChannelInterceptor default methods + deprecate adapter 2018-05-23 21:48:19 -04:00
Rossen Stoyanchev 592dc628d5 Use specific XSD types in spring-websocket.xsd
Issue: SPR-16531
2018-05-18 21:32:46 -04:00
Rossen Stoyanchev 37b0ed9fcb Improve TCP connection info logging.
After the recent changes to expose configuring TcpOperations, it no
longer makes sense to automatically log the relayHost/Port since that's
mutually exclusive with a custom TcpOperations.

Instead we delegate to TcpOperations.toString().

Issue: SPR-16801
2018-05-16 11:40:51 -04:00
Rossen Stoyanchev 020c6c0102 Polish: remove Javadoc tags from spring-websocket.xsd 2018-05-16 10:18:01 -04:00
Rossen Stoyanchev 29158aa79a Expose timeToFirstMessage in Java/XML config
Issue: SPR-16531
2018-05-16 10:03:57 -04:00
Juergen Hoeller 53aa9cc4cd Upgrade to Servlet API 4.0.1 (aligned with Tomcat 9 and Undertow 2)
Issue: SPR-16470
2018-05-07 14:17:28 +02:00
Johnny Lim fb898e1727 Remove inconsistent spaces 2018-05-05 11:07:35 +02:00
Rossen Stoyanchev 0e776d4e77 Add more detail to ISE in ServerEndpointExporter
Issue: SPR-16655
2018-04-23 17:03:09 -04:00
Rossen Stoyanchev ff2228fdaf Selector header name is exposed for configuration
Issue: SPR-16732
2018-04-16 23:56:30 -04:00
igor-suhorukov 4aae6a6dda Use Map.forEach instead of manual Map.Entry iteration wherever possible SPR-16646 2018-03-28 01:09:03 +02:00
Juergen Hoeller e3d0ef6015 Use Map.forEach instead of manual Map.Entry iteration wherever possible
Issue: SPR-16646
2018-03-27 00:38:32 +02:00
Juergen Hoeller d4a8f76bf9 Consistent volatile access to running flag in Lifecycle implementations
Issue: SPR-16488
2018-03-15 15:17:55 +01:00
igor-suhorukov 407ecf7334 to get rid of "magic" time constants 2018-03-08 20:37:48 +01:00
Juergen Hoeller 139dc1d373 Polishing (collapsed if checks, consistent downcasts, refined javadoc) 2018-03-08 18:11:57 +01:00
igor-suhorukov 0f7485b01d Polish: reorder the modifiers to comply with the Java Language Specification. 2018-03-08 17:57:47 +01:00
Juergen Hoeller cec7204fca Polishing 2018-03-02 13:53:17 +01:00
igor-suhorukov ed936cbd89 Polish: Overriding methods should do more than simply call the same method in the super class 2018-03-02 00:06:27 +01:00
Juergen Hoeller bfddbbe731 Polishing 2018-03-01 01:39:06 +01:00
igor-suhorukov 8080f56db8 Polish: "@Override" should be used on overriding and implementing methods 2018-03-01 00:15:18 +01:00
Juergen Hoeller a5cbf5fe24 Consistent use of Collection.toArray with zero-sized array argument
Includes consistent use of ClassUtils.toClassArray (as non-null variant)

Issue: SPR-16523
2018-02-22 11:29:46 +01:00
Juergen Hoeller 0de36d2883 Consistent HttpMethod identity comparisons 2018-02-18 22:01:22 +01:00
Alexander Münch 37f19a4b43 Polish Javadoc
WebSocketMessageBrokerStats's Javadoc now states the correct default
logging period.

Closes gh-1691
2018-02-18 08:57:08 +01:00
Juergen Hoeller d7cab23e6d Consistent use of StringUtils.toStringArray
(cherry picked from commit 6d11b40)
2018-02-16 20:49:17 +01:00
Juergen Hoeller b35274f5a7 WebSocket callbacks need to remain inner classes (retaining generics) 2018-02-16 10:22:05 +01:00
igor-suhorukov 2be4985b8f Polish: anonymous inner classes containing only one method should become lambdas,
use getOrDefault instead of ternary operator
2018-02-16 09:38:19 +01:00
igor-suhorukov 45e520ed86 Polish: remove unused private fields, remove empty operator 2018-02-13 23:00:18 +01:00
Juergen Hoeller 3c631f8ea0 SubProtocolWebSocketHandler closes sessions outside of lifecycle monitor
Issue: SPR-16488
2018-02-13 00:04:55 +01:00
Juergen Hoeller d00e1c5e4f Polishing 2018-02-10 21:35:46 +01:00
Juergen Hoeller 39201adca4 Consistent handling of InterruptedException
Issue: SPR-16479
2018-02-10 13:03:33 +01:00
igor-suhorukov d3a1d44864 Polish: Maps with keys that are enum values should be replaced with EnumMap 2018-02-10 12:09:33 +01:00
igor-suhorukov 9a6fbf59c5 Polish: follow name convention - make immutable fields final 2018-02-10 12:09:19 +01:00
Juergen Hoeller 5c813a366b Consistent use of @throws instead of @exception 2018-02-05 22:51:51 +01:00
Juergen Hoeller cf100d4d03 AbstractClientSockJsSession.close propagates IOException from disconnect
Issue: SPR-16415
2018-01-25 12:24:46 +01:00
Juergen Hoeller 8e2be91353 Fine-tuned logging of WebSocket close exceptions
Issue: SPR-16409
2018-01-25 12:24:40 +01:00
Juergen Hoeller 0e6f8df0a8 ServletServerHttpRequest.getURI() ignores malformed query string
The resolved URI instance is also being cached now. This should not make a difference in a real Servlet environment but does affect tests which assumed they could modify an HttpServletRequest path behind a pre-created ServletServerHttpRequest instance. Our WebSocket test base class has been revised accordingly, re-creating the ServletServerHttpRequest in such a case.

Issue: SPR-16414
2018-01-24 22:13:40 +01:00
sdeleuze 43d3abdfd5 Fix SockJs CorsConfiguration for forbidden origins
After this commit, AbstractSockJsService uses the configured allowed
origins when generating the CorsConfiguration instead of "*".

As a consequence, forbidden origin requests still result in a 403
response but now with no CORS headers in order to improve consistency
between the status code and the headers.

Issue: SPR-16304
2018-01-15 18:07:24 +01:00
Rossen Stoyanchev 61352fe85b Fix compile error 2018-01-15 10:28:12 -05:00
Rossen Stoyanchev dd09c08cdf Replace use of AbstractWebSocketMessageBrokerConfigurer 2018-01-15 10:01:14 -05:00
Sergey d6591a6329 Default methods in WebSocketMessageBrokerConfigurer
+ deprecate AbstractWebSocketMessageBrokerConfigurer
2018-01-15 09:54:55 -05:00
Juergen Hoeller 7406f5993a Polishing 2017-11-13 22:39:39 +01:00
Juergen Hoeller b5cedd43eb Consistent and efficient access to BeanDefinition argument values
Issue: SPR-16192
2017-11-13 21:51:11 +01:00
Christoph Dreis 9fab208fdd Reduce access on headers for STOMP messaging
Issue: SPR-16165
2017-11-06 20:19:00 +01:00
Juergen Hoeller 5809f5b8eb SubProtocolWebSocketHandler provides protected decorateSession method
Issue: SPR-16089
2017-10-21 23:02:54 +02:00
Rossen Stoyanchev 1cc5afe24b Fix lines over 120 characters
https://github.com/spring-projects/spring-framework/wiki/Spring-Framework-Code-Style#line-wrapping
2017-10-20 16:42:26 -04:00
Juergen Hoeller a4537b1b6d Accessors for configured send-time and buffer-size limit
Issue: SPR-16089
2017-10-20 16:02:26 +02:00
Juergen Hoeller 16a08cb465 Upgrade to Jackson 2.9.2 2017-10-16 23:53:23 +02:00
Juergen Hoeller efce7902c4 Polishing 2017-09-27 01:34:11 +02:00
Juergen Hoeller 9190b76ab9 Latest dependency updates (POI 3.17, Rome 1.8, EhCache 3.4, Caffeine 2.5.6, RxJava 2.1.4, Tomcat 8.5.21, JRuby 9.1.13, Rhino 1.7.7.2) 2017-09-23 11:28:19 +02:00
Juergen Hoeller 7ae59d0c2a Nullability refinements on private and static methods
Based on IntelliJ IDEA 2017.3 introspection results.

Issue: SPR-15756
2017-09-22 18:22:14 +02:00
Juergen Hoeller 4cbef27f90 Consistent tolerance of unknown HTTP status codes behind RestTemplate
Issue: SPR-15978
2017-09-20 10:54:58 +02:00
Sebastien Deleuze 1bc93e3d0f Revisit nullability annotations
This commit introduces the following changes.

1) It adds a new Spring @NonNull annotation which allows to apply
@NonNullApi semantic on a specific element, like @Nullable does.
Combined with @Nullable, it allows partial null-safety support when
package granularity is too broad.

2) @Nullable and @NonNull can apply to ElementType.TYPE_USE in order
to be used on generic type arguments (SPR-15942).

3) Annotations does not apply to ElementType.TYPE_PARAMETER anymore
since it is not supported yet (applicability for such use case is
controversial and need to be discussed).

4) @NonNullApi does not apply to ElementType.FIELD anymore since in a
lot of use cases (private, protected) it is not part for the public API
+ its usage should remain opt-in. A dedicated @NonNullFields annotation
has been added in order to set fields default to non-nullable.

5) Updated Javadoc and reference documentation.

Issue: SPR-15756
2017-09-15 13:26:41 +02:00
Juergen Hoeller fd0132c7e6 Polishing 2017-09-08 16:56:22 +02:00
Brian Clozel cc3d7d2d48 Apply dependency management to selected modules
This commit applies the Dependency Management Plugin to modules that
require it; right now Spring Framework is importing BOMs for Netty and
Reactor dependencies only.

Instead of applying those BOMs to all modules, they're applied only
where they're needed.

Issue: SPR-15885
2017-08-21 14:42:03 +02:00
Brian Clozel 2eeb428e95 Move modules to independent build files
The main `build.gradle` file contains now only the common build
infrastructure; all module-specific build configurations have
been moved to their own build file.

Issue: SPR-15885
2017-08-21 14:41:55 +02:00
Sebastien Deleuze 73cf07e9a4 Fix overridden methods nullability
Issue: SPR-15869
2017-08-17 15:02:59 +02:00
Juergen Hoeller 25e6a2da64 StompSubProtocolHandler consistently accesses current user
Issue: SPR-15822
2017-07-27 11:32:32 +02:00
Rossen Stoyanchev 7e232f989b Improve check for "Broken pipe" error message
Issue: SPR-15802
2017-07-25 10:30:11 +02:00
Juergen Hoeller 46eba3dbfa Nullability fine-tuning around declaration inconsistencies
Issue: SPR-15720
Issue: SPR-15792
2017-07-19 22:22:20 +02:00
Sebastien Deleuze fb4ddb0746 Make getters and setters null-safety consistent
This commit ensure that null-safety is consistent between
getters and setters in order to be able to provide beans
with properties with a common type when type safety is
taken in account like with Kotlin.

It also add a few missing property level @Nullable
annotations.

Issue: SPR-15792
2017-07-19 09:07:56 +02:00
Juergen Hoeller 9afce23845 WebSocketSession.getUri() may return null
Issue: SPR-15721
2017-06-30 20:56:21 +02:00
Juergen Hoeller cc74a2891a @Nullable all the way: null-safety at field level
This commits extends nullability declarations to the field level, formalizing the interaction between methods and their underlying fields and therefore avoiding any nullability mismatch.

Issue: SPR-15720
2017-06-30 01:54:16 +02:00
Juergen Hoeller 7dd8dc62a5 Fixes for ignored tests after last week's nullability commit
Issue: SPR-15540
2017-06-13 11:37:58 +02:00
Stephane Nicoll fc64b8040f Polish "Replace relevant code with lambda"
Closes gh-1454
2017-06-13 09:42:20 +02:00
diguage 4b1478d830 Replace relevant code with lambda
See gh-1454
2017-06-13 08:55:38 +02:00
Juergen Hoeller 3ae84d6dd8 Consistent support for Charset/StandardCharsets in UriUtils etc
Issue: SPR-15613
2017-06-12 15:51:45 +02:00
diguage c1d44d9a34 Use the diamond syntax
Closes gh-1450
2017-06-12 09:19:06 +02:00
Juergen Hoeller f813712f5b Consistent use of @Nullable across the codebase (even for internals)
Beyond just formally declaring the current behavior, this revision actually enforces non-null behavior in selected signatures now, not tolerating null values anymore when not explicitly documented. It also changes some utility methods with historic null-in/null-out tolerance towards enforced non-null return values, making them a proper citizen in non-null assignments.

Some issues are left as to-do: in particular a thorough revision of spring-test, and a few tests with unclear failures (ignored as "TODO: NULLABLE") to be sorted out in a follow-up commit.

Issue: SPR-15540
2017-06-07 14:19:15 +02:00
Sebastien Deleuze 1f28825f9d Add more @Nullable parameters based on null usage
Issue: SPR-15540
2017-05-31 21:42:23 +02:00
Sebastien Deleuze b47d713e14 Add missing @Nullable annotations on parameters
Issue: SPR-15540
2017-05-31 16:56:08 +02:00
Sebastien Deleuze 87598f48e4 Introduce null-safety of Spring Framework API
This commit introduces 2 new @Nullable and @NonNullApi
annotations that leverage JSR 305 (dormant but available via
Findbugs jsr305 dependency and already used by libraries
like OkHttp) meta-annotations to specify explicitly
null-safety of Spring Framework parameters and return values.

In order to avoid adding too much annotations, the
default is set at package level with @NonNullApi and
@Nullable annotations are added when needed at parameter or
return value level. These annotations are intended to be used
on Spring Framework itself but also by other Spring projects.

@Nullable annotations have been introduced based on Javadoc
and search of patterns like "return null;". It is expected that
nullability of Spring Framework API will be polished with
complementary commits.

In practice, this will make the whole Spring Framework API
null-safe for Kotlin projects (when KT-10942 will be fixed)
since Kotlin will be able to leverage these annotations to
know if a parameter or a return value is nullable or not. But
this is also useful for Java developers as well since IntelliJ
IDEA, for example, also understands these annotations to
generate warnings when unsafe nullable usages are detected.

Issue: SPR-15540
2017-05-27 08:57:01 +02:00
Rossen Stoyanchev df8412bded ExceptoinWebSocketHandlerDecorator uses ERROR level
Issue: SPR-15537
2017-05-24 15:00:12 -04:00
Juergen Hoeller 9d8e9cf243 Common root cause introspection algorithm in NestedExceptionUtils
Issue: SPR-15510
2017-05-03 11:31:28 +02:00
Rossen Stoyanchev 779779de7b Refactor use of TaskScheduler in WebSocket Java config
Issue: SPR-15233
2017-04-11 17:41:41 -04:00
Rossen Stoyanchev 190408d1dc Polish 2017-04-11 15:08:39 -04:00
Rossen Stoyanchev 71852a9241 Trap exception from SockJS HeartbeatTask
Issue: SPR-15307
2017-03-16 18:02:06 -04:00
Juergen Hoeller 47c4cf7abf Drop support for Jetty 9.3 and OkHttp 2.x
Issue: SPR-15038
2017-03-06 17:54:02 +01:00
Rossen Stoyanchev 949bb55ef5 Refactor random port in spring-websocket
Remove the use of SocketUtils#findAvailableTcpPort in favor of letting
servers pick a dynamic port by specifying port 0.
2017-01-31 16:49:57 -05:00
Juergen Hoeller f84907a1fc Polishing 2017-01-31 12:00:13 +01:00
Juergen Hoeller 1b2dc3638f Revisit Assert to avoid single-arg assert methods (with refined messages)
Issue: SPR-15196
2017-01-30 22:15:55 +01:00
Rossen Stoyanchev ea67a637ae Align setup of SockJS and WebSocket integration tests
Failures in JettySockJsIntegrationTests after the upgrade to 9.4 were
hidden due to the PERFORMANCE test group but were failing on the CI
performance build with IllegalStateException inside Jetty on
"Failure find the required ServletContext attribute
org.eclipse.jetty.util.DecoratedObjectFactory".
2017-01-26 06:17:03 -05:00
Juergen Hoeller 12973ac702 Polishing 2017-01-24 00:12:53 +01:00
Juergen Hoeller f095aa20eb Polishing 2017-01-23 21:28:40 +01:00
Juergen Hoeller e94fa3f34d WebSocketSession.getExtensions consistently exposes unmodifiable/empty list
Issue: SPR-15180
2017-01-23 21:28:30 +01:00
Rossen Stoyanchev 2e414ab25a Well-known names for beans in message broker XML config
Issue: SPR-15068
2017-01-17 17:10:32 -05:00
Sam Brannen 9ed66bf2eb Clean up warnings across code base 2017-01-07 01:54:38 +01:00
Juergen Hoeller 483abfe266 Avoid explicit DecoratedObjectFactory setup in JettyRequestUpgradeStrategy
Issue: SPR-14940
(cherry picked from commit 709d4ba)
2016-12-21 09:56:13 +01:00
Juergen Hoeller 82c1c859d9 Polishing
(cherry picked from commit 9cb4de8)
2016-12-20 21:17:48 +01:00
Rossen Stoyanchev 47e141675f Minor refactoring + polish reactive WebSocket support
Rename classes not specific to Tomcat:
TomcatWebSocketSession -> StandardWebSocketSession
TomcatWebSocketHandlerAdapter -> StandardWebSocketHandlerAdapter

WebSocketSessionSupport is renamed to AbstractWebSocketSession since it
actually is a WebSocketSession and pre-implements a number of methods.

ServerEndpointRegistration is now package private (mainly for use in
upgrade strategies) and renamed to DefaultServerEndpointConfig.
2016-12-19 18:16:36 -05:00
Juergen Hoeller 7867e56494 Polishing 2016-12-19 02:00:28 +01:00
Juergen Hoeller b366e159f8 Fine-tuned handling of running state
Issue: SPR-14527
2016-12-14 21:59:49 +01:00
Rossen Stoyanchev 2191d80a31 Allow athentication at the STOMP level
This commit makes it possible for a ChannelInterceptor to override the
user header in a Spring Message that contains a STOMP CONNECT frame.

After the message is sent, the updated user header is observed and
saved to be associated with session thereafter.

Issue: SPR-14690
2016-12-13 17:59:51 -05:00
Juergen Hoeller e49813f2c4 Polishing 2016-12-12 22:49:40 +01:00
Juergen Hoeller 52799c0e3d Revised Jetty 9.3 vs 9.4 differentiation
Issue: SPR-14940
2016-12-09 15:21:31 +01:00
Brian Clozel 8d828dd16f Update websocket support for Jetty 9.3+
Due to a few changes in `WebSocketServerFactory` and `Session` API, our
`JettyRequestUpgradeStrategy` and `JettyWebSocketSession` needed to
adapt. As of 9.3.15+ and 9.4.0+, some reflection is required to support
previous versions.

Spring 5.0 supports Jetty 9.3 and 9.4.

Issue: SPR-14940
2016-12-08 21:53:28 +01:00
Rossen Stoyanchev b3fa1b40a0 Synchronized updates of STOMP header key cache
Issue: SPR-14901
2016-12-08 11:13:57 -05:00
Christoph Dreis 9b76dc2ab4 SPR-14901 Allow customization of STOMP message header encoding
Fixes SPR-14901
2016-12-08 11:13:56 -05:00
Juergen Hoeller f6fc0a86b3 Polishing
(cherry picked from commit 0028b29)
2016-12-01 20:11:47 +01:00
Rossen Stoyanchev d201a222b8 Avoid locking in WebSocket session "close" callback
When processing a "close" notification from the server make an effort
to cancel any outstanding heartbeat but avoid going as far as acquiring
the responseLock since the server itself may already hold a lock of its
own leading to a potential deadlock.

The heartbeat task is now also further protected with an isClosed()
check in case the heartbeat does not get cancelled in a concurrent
scenario.

Issue: SPR-14917
2016-11-23 20:49:24 -05:00
Christoph Dreis a929e9ccaa Implement allocation-friendly method to get user count in SimpUserRegistry
SPR-14930
2016-11-21 21:02:10 +01:00
Juergen Hoeller da63898d5f Polishing 2016-11-21 17:36:04 +01:00
Juergen Hoeller a49809b1a4 WebSocketServerSockJsSession uses dedicated disconnect lock
Issue: SPR-14917
2016-11-21 17:24:44 +01:00
Juergen Hoeller ac774cdcef Avoid deprecated Mockito methods
Issue: SPR-14880
2016-11-04 12:24:46 +01:00
Juergen Hoeller 84d3808b3b Upgrade to Mockito 2.2
Issue: SPR-14880
2016-11-03 22:53:35 +01:00
Juergen Hoeller a90e4b230f Polishing
Issue: SPR-14867
2016-11-03 14:41:41 +01:00
Rossen Stoyanchev 87e01513fd Check SockJS session type
This commits adds a validation check whether the SockJS session type
matches the transport type and rejects requests for which they
don't match.

Issue: SPR-14867
2016-11-03 09:35:30 +02:00
Juergen Hoeller 72e1f7e898 Avoid deadlock between SockJS heartbeat and XHR polling
Issue: SPR-14833
2016-10-28 23:34:19 +02:00
Juergen Hoeller 66722afda0 StompSubProtocolHandler does not insist on SimpMessageHeaderAccessor
Issue: SPR-14791
2016-10-12 17:08:05 +02:00
Juergen Hoeller cfa0f6c84b Consistent final logger fields 2016-10-04 23:00:36 +02:00
Juergen Hoeller fb7ae010c8 Avoid unnecessary generics on emptyMap/Set/List 2016-09-26 18:04:49 +02:00
Sam Brannen b521aa879f Clean up warnings related to forthcoming removals in Tomcat 9 2016-09-17 16:16:06 +02:00
Juergen Hoeller ab9fea6b8d Polishing
(cherry picked from commit 3767092)
2016-08-31 02:08:31 +02:00