Commit Graph

328 Commits

Author SHA1 Message Date
Rossen Stoyanchev 8ab8448148 Move tests to packages where they belong 2014-04-01 13:16:51 -04:00
Rossen Stoyanchev 73ecbc047c Update JettyWebSocketSession
Ensure the JettyWebSocket session can return the Principal and accepted
WebSocket sub-protocol even after the session is closed.

Issue: SPR-11621
2014-04-01 13:13:55 -04:00
Sebastien Deleuze a805f12374 Make WebSocket fields available after it is closed
Update some native WebSocket session getters to return basic
information after it is closed. It is required for example in
SubProtocolWebSocketHandler#afterConnectionEstablished() or
StompSubProtocolHandler#afterSessionStarted().

Issue: SPR-11621
2014-04-01 11:26:22 -04:00
Rossen Stoyanchev 6ec3de6029 Fix issue with default executor for broker channel
The default for the broker channel should be "no executor".

Issue: SPR-11623
2014-04-01 11:18:28 -04:00
Sebastien Deleuze fb7d81c4a2 Fix <websocket:interceptors> default configuration
Adding a ChannelInterceptor does not suppress default executor
settings anymore in the XML namespace.

Issue: SPR-11623
2014-04-01 10:49:09 -04:00
Rossen Stoyanchev ace6bd2418 Improve shutdown responsiveness of SubProtocolWSH
Proactively notify all active WebSocket sessions when a shutdown is
progress. Sessions then can ignore further attempts to send messages
and also stop stop trying to flush messages right away.
2014-03-27 20:15:53 -04:00
Rossen Stoyanchev 3347b45292 Provide more accurate error message 2014-03-26 11:32:34 -04:00
Rossen Stoyanchev bbf101eef6 Fix issue in last commit 2014-03-25 09:59:09 -04:00
Rossen Stoyanchev a247d5f2e8 Guard against exceptions from ApplicationListener
Issue: SPR-11578
2014-03-25 09:05:42 -04:00
Rossen Stoyanchev 1c1e1145a2 Allow configuring WebSocket message size in a session
Issue: SPR-11575
2014-03-25 00:27:05 -04:00
Rossen Stoyanchev 5caf36ae91 Update default pools size for SockJS scheduler
This change updates the XML namespace to match a change already made
to the Java config.
2014-03-24 21:44:03 -04:00
Rossen Stoyanchev 13da7057e6 Add session lifecycle ApplicationEvent's
Issue: SPR-11578
2014-03-24 20:30:41 -04:00
Rossen Stoyanchev c11484b2e7 Add WebSocket transport configuration support
Issue: SPR-11527
2014-03-24 19:20:38 -04:00
Rossen Stoyanchev 1e9960e1ce Add WebSocketTransportRegistration
Issue: SPR-11527
2014-03-24 19:20:38 -04:00
Rossen Stoyanchev 545c4effb1 Polish StompDecoder and the new Buffering sub-class
Issue: SPR-11527
2014-03-24 19:20:37 -04:00
Sebastien Deleuze bbdb72d808 Add configuration for message buffer size limit
BufferingStompDecoder message buffer size limit can now be configured
with JavaConfig MessageBrokerRegistry.setMessageBufferSizeLimit() or
with XML <websocket:message-brocker message-buffer-size="">.

Issue: SPR-11527
2014-03-24 19:20:37 -04:00
Rossen Stoyanchev ebffd67b5e Add BufferingStompDecoder
Before this change the StompDecoder decoded and returned only the first
Message in the ByteBuffer passed to it. So to obtain all messages from
the buffer, one had to loop passing the same buffer in until no more
complete STOMP frames could be decoded.

This chage modifies StompDecoder to return List<Message> after
exhaustively decoding all available STOMP frames from the input buffer.
Also an overloaded decode method allows passing in Map that will be
populated with any headers successfully parsed, which is useful for
"peeking" at the "content-length" header.

This change also adds a BufferingStompDecoder sub-class which buffers
any content left in the input buffer after parsing one or more STOMP
frames. This sub-class can also deal with fragmented messages,
re-assembling them and parsing as a whole message.

Issue: SPR-11527
2014-03-24 19:20:37 -04:00
Rossen Stoyanchev 15188a8eee Document IE 8 and 9 related SockJS transport details
Issue: SPR-11496, SPR-11525
2014-03-23 22:52:13 -04:00
Rossen Stoyanchev 7af74b2475 Disable SockJS heartbeat if STOMP heartbeat is on 2014-03-23 02:12:57 -04:00
Rossen Stoyanchev 2c6d6b524d Adjust SockJS scheduler core pool size
Issue: SPR-11556
2014-03-23 01:04:30 -04:00
Rossen Stoyanchev 7651f83b4c Polish 2014-03-23 01:01:39 -04:00
Rossen Stoyanchev cbd5af3a03 Add CloseStatus to indicate unreliable session
When a send timeout is detected, the WebSocket session is now closed
with a custom close status that indicates so. This allows skipping
parts of the close logic that may cause further hanging.

Issue: SPR-11450
2014-03-23 00:51:33 -04:00
Rossen Stoyanchev 4028a3b0bc Remove synchronized keywords from SockJsSession impls
Before this change SockJsSession implementations of WebSocketSession
used synchronization around its method implementations protecting
internal state and ensuring only a single thread is sending messages
at a time.

A WebSocketSession is generally expected to be used from one thread
at a time and now that application messages are sent through
ConcurrentWebSocketSessionDecorator, there is no concern about
application messages sent from the different threads.

While there are some remaining concerns, those can be addressed
without using the synchronized keyword. This change removes it from
the methods of all SockJS session implementations.

Issue: SPR-11450
2014-03-22 22:59:48 -04:00
Rossen Stoyanchev ffac748f1c Improve ConcurrentWebSocketSessionDecorator
Before this change the decorator ensured that for a specific WebSocket
session only one thread at a time can send a message. Other threads
attempting to send would have their messages buffered and each time
that occurs, a check is also made to see if the buffer limit has been
reached or the send time limit has been exceeded and if so the session
is closed.

This change adds further protection to ensure only one thread at a time
can perform the session limit checks and attempt to close the session.
Furthermore if the session has timed out and become unresponsive,
attempts to close it may block yet another thread. Taking this into
consideration this change also ensures that state associated with the
session is cleaned first before an attempt is made to close the session.

Issue: SPR-11450
2014-03-22 22:59:39 -04:00
Rossen Stoyanchev 299be08268 Remove synchronized block around WebSocketSession.send
Since we now wrap the WebSocketSession with a concurrent decorator, the
synchronized keyword around message sending needed to be removed.

Issue: SPR-11586
2014-03-21 11:42:23 -04:00
Brian Clozel 26309838ba Set custom handshakeHandler for XML sockjs config
Prior to this commit, configuring a custom handshakeHandler when setting
up a stomp-endpoint with SockJS would not be taken into account:

  <websocket:stomp-endpoint path="/foo">
    <websocket:handshake-handler ref="customHandler"/>
    <websocket:sockjs/>
  </websocket:stomp-endpoint>

This commit fixes this by creating and registering a
WebsocketTransportHandler (with this handshakeHandler) as a
transportHandler override for the SockJSService.

Issue: SPR-11568
2014-03-21 10:00:11 +01:00
Rossen Stoyanchev b7a974116e Add concurrent WebSocket session decorator (temp commit)
Issue: SPR-11586
2014-03-21 01:29:29 -04:00
Rossen Stoyanchev ac968e94ed Add getter for the length of a WebSocket message 2014-03-20 21:19:18 -04:00
Stephane Nicoll 4cd818b9e4 Harmonize log configuration
Prior to this commit, the codebase was using a mix of log4j.xml
and log4j.properties for test-related logging configuration. This
can be an issue as log4j takes the xml variant first when looking
for a default bootstrap configuration.

In practice, some modules declaring the properties variant were
taking the xml variant configuration from another module.

The general structure of the configuration has also been
harmonized to provide a standard console output as well as an
easy way to enable trace logs for the current module.
2014-03-20 09:43:29 -07:00
Rossen Stoyanchev 10af128e96 Update thread pool settings in STOMP/WebSocket config
The clientInboundChannel and clientOutboundChannel now use twice
the number of available processors by default to accomodate for some
degree of blocking in task execution on average.

In practice these settings still need to be configured explicitly in
applications but these should serve as better default values than
the default values in ThreadPoolTaskExecutor.

Issue: SPR-11450
2014-03-20 00:45:37 -04:00
Rossen Stoyanchev 1bab8a3916 Add session attributes to SimpMessageHeaderAccessor
This change exposes the WebSocketSession attributes through a message header.
The StompSubProtocolHandler adds this to incoming messages.
For now messaging handling  methods can access the map via @Header, e.g.:

@Header(StompHeaderAccessor.SESSION_ATTRIBUTES) Map<String, Object> attrs) {

Issue: SPR-11566
2014-03-19 13:45:40 -04:00
Rossen Stoyanchev 48b62e80d5 Rename handshakeAttributes to just attributes
Issue: SPR-11566
2014-03-19 12:25:08 -04:00
Rossen Stoyanchev 9552c82e2d Remove use of simple executor in WebSocket clients
Issue: SPR-11580
2014-03-19 10:24:48 -04:00
Juergen Hoeller 373f07b1ff Polishing 2014-03-18 22:30:32 +01:00
Rossen Stoyanchev 6bcbb94aba Refine BrokerAvailabilityEvent behavior
Add accessor for brokerAvailable in AbstractBrokerMessageHandler
Ensure brokerAvailable is set even if eventPublisher is not
Add tests BrokerMessageHandlerTests

Turn off brokerAvailable when StompBrokerRelayMessageHandler stops
Actually stop message handling when brokerAvailable=false
Improve log messages

Issue: SPR-11563
2014-03-16 18:12:45 -04:00
Sam Brannen a006ca2542 Remove trailing whitespace 2014-03-13 12:21:32 +01:00
Brian Clozel 8b2b165777 Fix "relay-port" XSD type in spring-websocket.xsd
Prior to this commit, the `relay-port` attribute of the
`<websocket:stomp-broker-relay />` tag was of type `xsd:int`.
This prevents developers from using `PropertyPlaceholderConfigurer`,
even though this configuration key is a good candidate for such use
(this value depends on prod/staging/etc environment).

This commit changes that type to `xsd:string`.

Issue: SPR-11537
2014-03-11 20:33:13 +01:00
Rossen Stoyanchev cff23b84ae Add messages for number of active sessions/connections
Issue: SPR-11531
2014-03-10 16:58:02 -04:00
Rossen Stoyanchev 49d7bda722 Improve CORS handling in AbstractSockJsService
After this change, AbstractSockJsService does not add CORS headers if
the response already contains an "Access-Control-Allow-Origin" header.
Essentially it backs off assuming CORS headers are handled centrally
e.g. through a Filter.

In order to support this, the ServletServerHttpResponse now returns an
instance of HttpHeaders that also provides access to headers already
present in the HttpServletResponse.

Issue: SPR-11443
2014-03-05 21:06:46 -05:00
Rossen Stoyanchev a434903a2a Adjust log level in LoggingWebSocketHandlerDecorator 2014-03-05 11:13:41 -05:00
Sam Brannen 9891bdc7b4 Clean up "abstract" test issues
- Deleted empty AbstractWebSocketClientTests class.

 - AbstractServletHandlerMethodTests and AbstractHttpRequestTests are
   now actually declared as abstract.

 - The following classes are not abstract but currently have an
   "Abstract" prefix and therefore get ignored by the Gradle build.
   This commit renames each of these by deleting the "Abstract" prefix.

   - AbstractFlashMapManagerTests
   - AbstractMappingContentNegotiationStrategyTests
   - AbstractSockJsServiceTests
   - AbstractWebSocketHandlerRegistrationTests
2014-03-05 12:41:26 +01:00
Sam Brannen b42f258c54 Use unmodifiable set in AbstractSockJsSession 2014-03-05 11:04:06 +01:00
Sam Brannen 8f3a897502 Polish AbstractSockJsSession 2014-03-02 16:21:48 +01:00
Rossen Stoyanchev 4238299661 Add smart logging for disconnected SockJS clients
The Servlet API does not provide notifications when a client
disconnects, see see https://java.net/jira/browse/SERVLET_SPEC-44.
Therefore network IO failures may occur simply because a client has
gone away. Before this change that could fill logs with unnecessary
stack traces.

After this change we make a best effort to identify such network
failures, on a per-server basis (tested with Jetty, Tomcat, Glassfish,
and WildFly), and log them under a separate log category.

A simple one-line message is logged at DEBUG level (i.e. no stack trace)
while a full stack trace is shown at TRACE level.

Issue: SPR-11438
2014-03-01 14:46:44 -05:00
Rossen Stoyanchev 6016536055 Remove ContentTypeResolver from composite converter
Before this change CompositeMessageConverter had a ContentTypeResolver
field that was in turn set on all contained converters.

After this change that field is removed and effectively
CompositeMessageConverter is a simple container of other converters.
Each converter in turn must have been configured with a
ContentTypeResolver.

Doing so means it is less likely to have unexpected consequences when
configuring converters, the ContentTypeResolver set in the composite
converter overriding the one configured in a contained converter.

Also commit 676ce6 added default ContentTypeResolver initialization
to AbstractMessageConverter, which ensures that converters are still
straight forward to configure.

Issue: SPR-11462
2014-02-27 21:41:35 -05:00
Rossen Stoyanchev 32e5f57e64 Ensure matching user destination returned
Before this change, when a client subscribed to a "user" destination
(e.g. /user/foo), actual messages received in response to that
subscription contained the server-translated, unique user destination
(e.g. /foo-user123).

This is not an issue for clients such as stomp.js since the
subscription is unique and sufficient to match subscription responses.
However, other STOMP clients do additional checks on the destination
of the subscription and the response.

This change ensures that messages sent to clients on user destionations
always contain a destination that matches the one on the original
subscription.

Issue: SPR-11423
2014-02-13 16:38:56 -05:00
Rossen Stoyanchev dfe2234781 Upgrade to Undertow 1.0 Final (WildFly 8 Final) 2014-02-12 11:06:51 -05:00
Rossen Stoyanchev 1c4530f251 Re-enable Undertow tests in WebSocketConfigurationIT 2014-01-22 14:50:25 -05:00
Rossen Stoyanchev 8ee2a2d18c Remove unused constructor arg from UserDestinationMH 2014-01-22 11:55:44 -05:00
Rossen Stoyanchev 0db2f79bdb Polish message method handling tests 2014-01-22 11:29:38 -05:00
Sam Brannen 597ef099d0 Suppress warnings and remove unused imports 2014-01-22 12:23:32 +01:00
Juergen Hoeller 12c393eb6d Switched 'order' attributes across namespaces to 'xsd:token'
Issue: SPR-10886
Issue: SPR-7342
2014-01-22 11:35:21 +01:00
Juergen Hoeller 3969467851 Temporarily deactivated Undertow integration tests
Undertow tests fail against OpenJDK 8 build 124 with a BindException.
2014-01-22 11:34:27 +01:00
Rossen Stoyanchev ae06c3a6ab Use DestinationUserNameProvider with @SendTo
Issue: SPR-11327
2014-01-21 12:32:35 -05:00
Rossen Stoyanchev e4ad2b352e Add DestinationUserNameProvider interface
The interface is to be implemented in addition to
java.security.Principal when Principal.getName() is not globally unique
enough for use in user destinations.

Issue: SPR-11327
2014-01-21 12:12:05 -05:00
Rossen Stoyanchev c376ee92cd Allow setting Cookie header
Issue: SPR-11332
2014-01-20 13:25:57 -05:00
Rossen Stoyanchev e2feed494b Move "handlers" field to AbstractSubscribableChannel
Move the management of subscribers to the abstract parent class where
it belongs.
2014-01-17 11:24:28 -05:00
Rossen Stoyanchev c1f3da082c Write prelude on successive SockJS streaming requests
sockjs-client expects a prelude to be written on every request with
streaming transports. The protocol tests don't make this clear and
don't expose this issue.

The test case for SPR-11183 (writing 20K messages in succession) did
expose the issue and this commit addresses it.

Issue: SPR-11183
2014-01-16 12:27:14 -05:00
Juergen Hoeller 6051ea8ae3 Polishing 2014-01-16 16:54:49 +01:00
Rossen Stoyanchev 5f2106046c Add UpgradeRequestStrategy for WildFly/Undertow
Issue: SPR-11237
2014-01-14 16:45:18 -05:00
Rossen Stoyanchev ea0825c0a6 Trim tokenized strings in websocket namespace
Issue: SPR-11307
2014-01-14 12:45:47 -05:00
Rossen Stoyanchev a5c3143512 Allow hook to associate user with WebSocket session
This change adds a protected method to DefaultHandshakeHandler to
determine the user for the WebSocket session. By default it's
implemeted to obtain it from the request.

Issue: SPR-11228
2014-01-13 16:39:37 -05:00
Rossen Stoyanchev 6265bc1df7 Fall back on user in the Jetty UpgradeRequest
The Jetty ServletWebUpgradeRequest implements getUserPrincipal to
return the Principal from the HttpServletRequest on the upgrade.
This change ensures we can fall back on that.

However the JettyRequestUpgradeStrategy still passes the user from
HttpServletRequest from the upgrade, in order to work with Jetty
9.0.x and avoid running into this 9.1.x issue:

https://bugs.eclipse.org/bugs/show_bug.cgi?id=423118
2014-01-13 16:39:37 -05:00
Rossen Stoyanchev 4342497305 Add support for custom message converters
The Java and XML config for STOMP WebSocket applications now supports
configuring message converters.

Issue: SPR-11184
2014-01-07 16:16:29 -05:00
Rossen Stoyanchev d0556e61f9 Log stack trace on failure to send message to client
Issue: SPR-11201
2014-01-03 16:44:01 -05:00
Rossen Stoyanchev ef13dbfcdd Handle bad STOMP messages in StompSubProtocolHandler
Issue: SPR-11277
2014-01-02 12:27:59 -05:00
Rossen Stoyanchev 4e5e700213 Add client login/passcode to broker relay
Issue: SPR-11154
2013-12-23 21:40:27 -05:00
Juergen Hoeller 1f9b833c4d Introduced SockJsSession interface and moved SockJsSessionFactory and SockJsServiceConfig to sockjs.transport; added initialize(SockJsServiceConfig) method to TransportHandler interface; extracted TransportHandlingSockJsService from DefaultSockJsService; moved sockjs.support.frame to sockjs.frame and extracted (Default)SockJsFrameFormat from SockJsFrame; moved SockJsHttpRequestHandler to sockjs.support; removed Jackson 1.x support 2013-12-08 01:25:52 +01:00
Rossen Stoyanchev 307bf4bede Add messaging.simp.user package 2013-12-06 17:05:29 -05:00
Rossen Stoyanchev 89455c00f6 Create messaging.simp.broker package 2013-12-06 16:24:04 -05:00
Juergen Hoeller c4163c7475 Moved messaging.support.converter to messaging.converter; moved messaging.support.tcp to messaging.tcp; moved messaging.support.channel to messaging.support itself; moved handler.condition to handler itself; reworked handler.method into handler.support 2013-12-06 18:24:38 +01:00
Juergen Hoeller edeb11c556 Polishing 2013-12-04 23:58:05 +01:00
Rossen Stoyanchev 8f569264da Fix issue in GlassfishRequestUpgradeStrategy
The observed behavior was that the client does not get a response from
the WebSocket HTTP handshake. On the server the handshake actually
succeeds, the response is set correctly to status 101, and the
WebSocketHandler gets notified of the successfully established
connection.

This change flushes the ServletResponse just before returning from the
GlassfishRequestUpgradeStrategy. This is actually what Glassfish's own
TyrusServletFilter does as well at the end along with a comment that it
is a possible bug.
2013-12-03 14:42:55 -05:00
Brian Clozel 3ac14e7cd8 Document websocket XML namespace
Issue: SPR-11063
2013-12-03 18:15:21 +01:00
Rossen Stoyanchev 14468e80f3 Add principal in GlassfishRequestUpgradeStrategy 2013-12-03 12:02:41 -05:00
Juergen Hoeller 1dff45c38a Consistent ".jetty" and ".standard" subpackages; consolidated GlassFishRequestUpgradeStrategy implementation; renamed Text/BinaryWebSocketHandler and moved them to web.socket.support 2013-12-03 17:18:24 +01:00
Rossen Stoyanchev bb5a53f7f7 Update websocket xml namespace attributes 2013-12-02 21:55:44 -05:00
Rossen Stoyanchev cea049b791 Move websocket config tests to annotation package 2013-12-02 21:32:06 -05:00
Juergen Hoeller e62cd84ca2 Merged web.socket.messaging.config into web.socket.config and introduced web.socket.config.annotation 2013-12-02 23:54:38 +01:00
Rossen Stoyanchev 69238ba66f Move WebSocketExtension to top-level package 2013-12-02 16:53:11 -05:00
Juergen Hoeller e3e1c1bcec Rearranged web.socket.server subpackages and introduced web.socket.config 2013-12-02 22:32:32 +01:00
Rossen Stoyanchev 47ef45d152 Polish websocket xml namespace
Issue: SPR-11063
2013-12-02 15:25:49 -05:00
Rossen Stoyanchev 079fb2db73 Add assert AbstractStandardRequestUpgradeStrategy 2013-12-02 13:59:17 -05:00
Brian Clozel 10f5d96a78 Add XML namespace for WebSocket config
This commit adds an XML namespace equivalent of @EnableWebSocket and
@EnableWebSocketMessageBroker. Those are <websocket:handlers> and
<websocket:message-broker> respectively.

Examples can be found in the test suite.

This commit also alters the way MessageHandler's subscribe to their
respective MessageChannel's of interest. Rather than performing the
subscriptions in configuration code, the message channels are now
passed into MessageHandler's so they can subscribe themselves on
startup.

Issue: SPR-11063
2013-12-02 12:18:33 -05:00
Phillip Webb 043a41e382 Consistent whitespace after imports
Update code to have a consistent number of new-line characters after
import statements.
2013-11-26 15:14:43 -08:00
Phillip Webb 15698860e1 General polish of new 4.0 classes
Apply consistent styling to new classes introduced in Spring 4.0.

- Javadoc line wrapping, whitespace and formatting
- General code whitespace
- Consistent Assert.notNull messages
2013-11-26 15:11:18 -08:00
Rossen Stoyanchev 690051f46c Add ability to customize message channels
@EnableWebSocketMessageBroker message channel configuration can now be
customized via WebSocketMessageBrokerConfigurer. It is necessary to
make this easy and even required as part of the basic configuration
since by default the message channels are backed by a thread pool of
size 1, not suitable for production use.

Issue: SPR-11023
2013-11-26 16:51:14 -05:00
Rossen Stoyanchev e764c8d897 Fix synchronization issue in StompSubProtocolHandler
Two concurrent threads should not send a message on a single WebSocket
session at the same time, for example see:
http://docs.oracle.com/javaee/7/api/javax/websocket/RemoteEndpoint.Basic.html

In StompSubProtocolHandler it is quite possible that multiple messages
may be broadcast to a single WebSocket client concurrently.

This change adds synchronization around the sending of a message to a
specific cilent session.

Issue: SPR-11023
2013-11-26 16:51:14 -05:00
Phillip Webb a31ac882c5 Fix various javadoc warnings 2013-11-26 13:25:37 -08:00
Eric Dahl e9f78f6043 Fix various typos
Fix a variety of typos throughout the project, primarily in
comments (javadoc or otherwise) but also in a handful of log messages
and a couple exception messages.

ISSUE: SPR-11123
2013-11-25 15:58:27 -08:00
Rossen Stoyanchev 4e82416ba9 Add SubProtocolCapable interface
The addition of SubProtocolCapable simplifies configuration since it is
no longer necessary to explicitly configure DefaultHandshakeHandler
with a list of supported sub-protocols. We will not also check if the
WebSocketHandler to use for the WebSocket request is an instance of
SubProtocolCapable and obtain the list of sub-protocols that way. The
provided SubProtocolWebSocketHandler does implement this interface.

Issue: SPR-11111
2013-11-25 18:06:01 -05:00
Phillip Webb 59002f2456 Fix remaining compiler warnings
Fix remaining Java compiler warnings, mainly around missing
generics or deprecated code.

Also add the `-Werror` compiler option to ensure that any future
warnings will fail the build.

Issue: SPR-11064
2013-11-25 12:52:42 -08:00
Rossen Stoyanchev 4de3291dc7 Consolidate websocket/messaging code
Before this change spring-messaging contained a few WebSocket-related
classes including WebSocket sub-protocol support for STOMP as well
as @EnableWebSocketMessageBroker and related configuration classes.

After this change those classes are located in the spring-websocket
module under org.springframework.web.socket.messaging.

This means the following classes in application configuration must
have their packages updated:

org.springframework.web.socket.messaging.config.EnableWebSocketMessageBroker
org.springframework.web.socket.messaging.config.StompEndpointRegistry
org.springframework.web.socket.messaging.config.WebSocketMessageBrokerConfigurer

MessageBrokerConfigurer has been renamed to MessageBrokerRegistry and
is also located in the above package.
2013-11-23 21:09:17 -05:00
Rossen Stoyanchev df5d22e120 Improve logging in spring-messaging
Before this change the amount of logging was too little or too much
with TRACE turned on. This change separates useful debugging
information and logs it under DEBUG and leaves more detailed
information to be logged under TRACE.
2013-11-12 16:34:25 -05:00
Rossen Stoyanchev 2a6c1f75e7 Simplify determination of SockJS path
The SockJS path is now passed to the SockJsService handleRequest method
thus removing the need to guess it.

Issue: SPR-11058
2013-11-07 22:28:15 -05:00
Rossen Stoyanchev 0340cc5f03 Update user destinations handling
Before this change subscribing to a user-specific destination in STOMP
required manually appending a unique queue suffix provided in a header
with the CONNECTED frame.

This change removes the need to do that. Instead STOMP clients can
subscribe to "/user/queue/error" and can then begin to receive messages
sent to "/user/{username}/queue/error" without colliding with any other
user doing the same.

Issue: SPR-11077
2013-11-07 17:37:41 -05:00
Michael Irwin 467c770b4d Handle UnsupportedOperationException from getInstalledExtensions in Glassfish 4.0 2013-11-06 08:36:28 -05:00
Juergen Hoeller 9f3b8a2430 GenericTypeResolver's resolveTypeArguments needs to return null for raw types (for backwards compatibility with 3.2)
Issue: SPR-11052
2013-10-31 15:28:20 +01:00
Sam Brannen ec24299092 Delete unused imports 2013-10-31 13:58:26 +01:00
Rossen Stoyanchev 164a9f938c Update the Jetty WebSocket adapter
This changes switches from using Jetty's WebSocketListener interface
to use Jetty's @WebSocket annotations instead. The change should be
transparent but the annnotations provide a little more controler
including handling pong frames.

This change also introduces a WebSocketMessage interface.

Issue: SPR-10877
2013-10-29 21:37:49 -04:00