Commit Graph

560 Commits

Author SHA1 Message Date
Juergen Hoeller
aff5d211f4 StompSubProtocolHandler does not insist on SimpMessageHeaderAccessor
Issue: SPR-14791
(cherry picked from commit f5cd538)
2016-10-12 18:09:53 +02:00
Juergen Hoeller
ea9e00f819 Consistent final logger fields
(cherry picked from commit f2ac416)
2016-10-06 00:49:54 +02:00
Juergen Hoeller
8bdb1b0981 Polishing
(cherry picked from commit d04567b)
2016-09-26 18:48:44 +02:00
Juergen Hoeller
a0773aef1d Polishing 2016-09-18 21:24:19 +02:00
Juergen Hoeller
458d49bdb8 Polishing
(cherry picked from commit acbb254)
2016-08-31 01:31:06 +02:00
Rossen Stoyanchev
cc33bfaf61 Support receipt on DISCONNECT with simple broker
Issue: SPR-14568
2016-08-29 18:32:33 -04:00
Rossen Stoyanchev
91387a5ae7 Harden synchronization around SockJS heartbeats
Create an explicit heartbeat task with an experiration flag so that
it can be cancelled reliably vs relying on the ScheduledFutureTask
cancel method which may return true even if the task is already
running.

Issue: SPR-14356
2016-08-29 14:17:27 -04:00
Juergen Hoeller
3811a595ed Avoid unnecessary String concatenation in StompSubProtocolHandler
Issue: SPR-14624
(cherry picked from commit 0735e9b)
2016-08-24 23:49:12 +02:00
Juergen Hoeller
7b33cd6476 Polishing
(cherry picked from commit 67ba187)
2016-08-10 15:50:47 +02:00
Rossen Stoyanchev
c7daa4e94c Fix failing test 2016-08-08 21:43:42 -04:00
Rossen Stoyanchev
977b67e418 Protect sendHeartbeat from cancellation
Issue: SPR-14564
2016-08-08 17:33:57 -04:00
Juergen Hoeller
b5127dc152 Polishing 2016-07-20 22:16:35 +02:00
Juergen Hoeller
068186ca59 Polishing
(cherry picked from commit afe106e)
2016-07-15 23:01:20 +02:00
Juergen Hoeller
0445ce6c53 Polishing (backported from master)
(cherry picked from commit 92d78c1)
2016-07-06 17:35:30 +02:00
Rossen Stoyanchev
4c87167c98 Add heartbeat lock to SockJS server sessions
Even before this change SockJS sessions always cancelled the heartbeat
task first prior to sending messages. However when the heartbeat task
is already in progress, cancellation of it is not enough and we must
wait until the heartbeat is sent.

This commit adds a heartbeat write lock which is obtained and held
during the sending of a heartbeat. Now when sessions send a message
they still cancel the heartbeat task but if that fails they also wait
for the heartbeat write lock.

Issue: SPR-14356
2016-06-17 17:10:49 -04:00
Juergen Hoeller
85675fbe2e Consistent SmartLifecycle implementations
Issue: SPR-14233
(cherry picked from commit f83cbff)
2016-05-02 14:07:32 +02:00
Rossen Stoyanchev
9fa061431c XML config properly initialize WS message broker stats
Issue: SPR-14190
2016-04-26 17:24:48 -04:00
Venil Noronha
e67a274b32 Remove isOpen assertion when sending WebSocket message
Issue: SPR-14138
2016-04-18 09:45:01 -04:00
Venil Noronha
2eab3df4d1 Delegate sendMessage
Issue: SPR-14139
2016-04-18 09:29:33 -04:00
Juergen Hoeller
b7890ca28e Consistent license header
(cherry picked from commit 537193a)
2016-04-11 21:14:05 +02:00
Rossen Stoyanchev
000a0a0006 Call resetRequest after writeFrame for polling sessions
Previous refactoring (fcf6ae and also 43d937) in the SockJsSession
hierarchy consolidated access to the request and response in the
base class AbstractHttpSockJsSession in order to keep synchronization
concerns there. However that also unintentionally removed the call to
resetRequest() after sending a heartbeat for any of the
PollingSockJsSession classes. In general a polling session should call
resetRequest after every frame written.

This commit brings back the writeFrame override in PollingSockJsSession
with an extra call to resetRequest().

Issue: SPR-14107
2016-04-04 19:30:33 -04:00
Juergen Hoeller
6d479b2060 Polishing 2016-04-04 20:59:40 +02:00
Rossen Stoyanchev
01d50e9bde Fix incomplete log message
Commit 48236b from 2014 introduced a logging improvement to avoid
logging each removed session per line and instead log one line at
the end with all removed sessions ids. However that list of removed
session ids wasn't populated. This commit fixes that.

Issue: SPR-14111
2016-04-04 14:02:23 -04:00
Juergen Hoeller
0891fbaf97 Consistent formatting 2016-03-24 19:54:28 +01:00
Juergen Hoeller
2ea7fcde3e Polishing
(cherry picked from commit 9af12d2)
2016-03-24 17:17:58 +01:00
Rossen Stoyanchev
f053cdec51 Improve close in ConcurrentWebSocketSessionDecorator
Before this commit the concurrent session wrapper mainly protected the
sending of messages. The close itself however may also cause a message
to be sent as is the case of the SockJS protocol.

This change protects the close and checks if the session has exceeded
send time or buffer limits in which case the close status is changed
to SESSION_NOT_RELIABLE (introduced in commit cbd5af3a) which in turn
signals that extra care should be exercised when closing the session.

Issue: SPR-13904
2016-02-04 17:22:36 -05:00
Juergen Hoeller
4fc6ead548 SessionDisconnectEvent actually preserves given session user
Issue: SPR-13871
(cherry picked from commit cdc9bf7)
2016-01-26 20:29:08 +01:00
Rossen Stoyanchev
33112df237 Fix second failing test 2016-01-20 23:13:34 -05:00
Juergen Hoeller
6f2f3595e9 Backported import and declaration cleanup 2015-12-18 00:18:09 +01:00
Juergen Hoeller
7344dd259c Allow for explicit spring-websocket-4.2.xsd declarations
Issue: SPR-13804
2015-12-18 00:02:14 +01:00
Juergen Hoeller
f3ac64153e Correct spring-websocket-4.2 versus spring-websocket-4.1 xsd declarations
Issue: SPR-13804
(cherry picked from commit 2fd48c9)
2015-12-17 18:34:47 +01:00
Juergen Hoeller
753347ea98 Consistent static final logger declarations 2015-12-16 20:44:00 +01:00
Juergen Hoeller
5d454d5ea7 Polishing 2015-12-15 15:59:30 +01:00
Juergen Hoeller
21329df7e1 Polishing 2015-12-14 00:56:06 +01:00
Juergen Hoeller
bdb606b8b1 Polishing 2015-12-13 23:27:05 +01:00
Juergen Hoeller
4261f34b63 Consistent and lenient HttpMethod resolution across all web modules
Issue: SPR-13776
2015-12-09 12:26:44 +01:00
Juergen Hoeller
9973694ed2 Polishing 2015-12-04 20:43:20 +01:00
Juergen Hoeller
3d1ae9c604 Efficient and consistent setAllowedOrigins collection type
Issue: SPR-13761
2015-12-04 16:21:53 +01:00
Juergen Hoeller
cd4ce8727e WebSocket namespace consistently applies resolvable allowed-origins value
Issue: SPR-13760
2015-12-04 16:01:14 +01:00
Rossen Stoyanchev
f5e681e6e6 lastSessionCheckTime updated after session check
Issue: SPR-13745
2015-12-02 15:07:52 -05:00
Juergen Hoeller
747863d503 Documented units for send-time limit and buffer-size limit
Issue: SPR-13753
2015-12-02 13:52:13 +01:00
Juergen Hoeller
2bf8c0bc42 Polishing 2015-11-10 23:47:46 +01:00
Rossen Stoyanchev
3e807c297d Update WebLogicRequestUpgradeStrategy for WLS 12.2.1
Issue: SPR-13234
2015-10-29 17:09:43 -04:00
Rossen Stoyanchev
5ac57e8ea6 Restore compatibility with WildFly
Issue: SPR-13619
2015-10-28 17:56:02 -04:00
Rossen Stoyanchev
2bd1daa75e Protect against RFD exploits
Issue: SPR-13548
2015-10-15 10:33:27 +02:00
Juergen Hoeller
8fbba84aca Optimized support for GlassFish 4.1.1 (Tyrus 1.9 - 1.12)
Issue: SPR-13566
2015-10-13 20:42:47 +02:00
Brian Clozel
0f70ac74cd Polish
Constructor.getParameterCount is JDK8+ only!
2015-10-13 16:15:02 +02:00
Brian Clozel
b7e75c5db4 Fix websocket compatibility with Tyrus 1.9 - 1.12
As of Tyrus 1.9, `TyrusEndpointWrapper`'s constructor has a new Boolean
argument (which is mandatory).

This commit reflectively chooses the right constructor method for Tyrus
1.9+ versions.

Issue: SPR-13566
2015-10-13 16:05:57 +02:00
Juergen Hoeller
b15f40472e Updated compatibility statements in RequestUpgradeStrategy javadocs 2015-10-13 13:39:24 +02:00
Brian Clozel
6b34fe3dd4 Fix undertow httpClientConnect invoke signature
Issue: SPR-13551
2015-10-08 16:23:31 +02:00