1. 12 5月, 2014 1 次提交
    • R
      Add WebSocket scope · 2c4cbb61
      Rossen Stoyanchev 提交于
      This change adds support for a custom "websocket" scope.
      
      WebSocket-scoped beans may be injected into controllers with message
      handling methods as well as channel interceptor registered on the
      "inboundClientChannel".
      
      Issue: SPR-11305
      2c4cbb61
  2. 09 5月, 2014 1 次提交
    • R
      Allow use of @SendToUser even w/o authenticated user · 97fb308b
      Rossen Stoyanchev 提交于
      Before this change, subscribing to a user destination and use of
      @SendToUser annotation required an authenticated user.
      
      This change makes it possible to subscribe to a user destination from
      WebSocket sessions without an authenticated user. In such cases the
      destination is associated with one session only rather than with a
      user (and all their sessions).
      
      It is then also possible to send a message to a user destination
      via "/user/{sessionId}/.." rather than "/user/{user}/...".
      
      That means @SendToUser works relying on the session id of the input
      message, effectively sending a reply to destination private to the
      session.
      
      A key use case for this is handling an exception with an
      @MessageExceptionHandler method and sending a reply with @SendToUser.
      
      Issue: SPR-11309
      97fb308b
  3. 07 5月, 2014 1 次提交
    • S
      Avoid ConcurrentModificationException · 98738c0b
      Sebastien Deleuze 提交于
      Removal of cached destination is now moved outside the for loop
      that removes subscriptions to avoid ConcurrentModificationException.
      
      Also since updateCache is a LinkedHashMap with accessOrder=true,
      a simple access with updateCache.get() modify the map.
      By iterating over updateCache.entrySet(), we avoid this update.
      
      Issue: SPR-11755
      98738c0b
  4. 01 5月, 2014 2 次提交
  5. 30 4月, 2014 6 次提交
  6. 26 4月, 2014 1 次提交
  7. 24 4月, 2014 2 次提交
    • S
      @SendTo support for jms listener endpoints · bded025d
      Stephane Nicoll 提交于
      This commit replaces the "responseDestination" attribute on the
      JmsListener annotation by a support of the standard SendTo annotation.
      
      Issue: SPR-11707
      bded025d
    • R
      Rename Reactor support classes · 08f03950
      Rossen Stoyanchev 提交于
      This change modifies the names of the Reactor support classes in order
      to align with the same changes in the 4.0.x line which now supports
      both Reactor 1.1 and 1.0.
      
      Issue: SPR-11636
      08f03950
  8. 22 4月, 2014 1 次提交
  9. 18 4月, 2014 2 次提交
  10. 17 4月, 2014 1 次提交
    • S
      JMS annotation-driven endpoints. · 713dd60f
      Stephane Nicoll 提交于
      This commit adds the support of JMS annotated endpoint. Can be
      activated both by @EnableJms or <jms:annotation-driven/> and
      detects methods of managed beans annotated with @JmsListener,
      either directly or through a meta-annotation.
      
      Containers are created and managed under the cover by a registry
      at application startup time. Container creation is delegated to a
      JmsListenerContainerFactory that is identified by the containerFactory
      attribute of the JmsListener annotation. Containers can be
      retrieved from the registry using a custom id that can be specified
      directly on the annotation.
      
      A "factory-id" attribute is available on the container element of
      the XML namespace. When it is present, the configuration defined at
      the namespace level is used to build a JmsListenerContainerFactory
      that is exposed with the value of the "factory-id" attribute. This can
      be used as a smooth migration path for users having listener containers
      defined at the namespace level. It is also possible to migrate all
      listeners to annotated endpoints and yet keep the
      <jms:listener-container> or <jms:jca-listener-container> element to
      share the container configuration.
      
      The configuration can be fine-tuned by implementing the
      JmsListenerConfigurer interface which gives access to the registrar
      used to register endpoints. This includes a programmatic registration
      of endpoints in complement to the declarative approach. A default
      JmsListenerContainerFactory can also be specified to be used if no
      containerFactory has been set on the annotation.
      
      Annotated methods can have flexible method arguments that are similar
      to what @MessageMapping provides. In particular, jms listener endpoint
      methods can fully use the messaging abstraction, including convenient
      header accessors. It is also possible to inject the raw
      javax.jms.Message and the Session for more advanced use cases. The
      payload can be injected as long as the conversion service is able to
      convert it from the original type of the JMS payload. By
      default, a DefaultJmsHandlerMethodFactory is used but it can be
      configured further to support additional method arguments or to
      customize conversion and validation support.
      
      The return type of an annotated method can also be an instance of
      Spring's Message abstraction. Instead of just converting the payload,
      such response type allows to communicate standard and custom headers.
      
      The JmsHeaderMapper infrastructure from Spring integration has also
      been migrated to the Spring framework. SimpleJmsHeaderMapper is based
      on SI's DefaultJmsHeaderMapper. The simple implementation maps all
      JMS headers so that the generated Message abstraction has all the
      information stored in the protocol specific message.
      
      Issue: SPR-9882
      713dd60f
  11. 15 4月, 2014 2 次提交
  12. 14 4月, 2014 4 次提交
    • R
      Switch BufferingStompDecoder to decoration · 65b17b80
      Rossen Stoyanchev 提交于
      The BufferingStompDecoder now decorates rather than extend
      StompDecoder. This allows a single StompDecoder instance to be
      configured and extended independantly while buffering remains a
      separate concern.
      65b17b80
    • R
      Support mutable headers in MessagingTemplate · fda9c633
      Rossen Stoyanchev 提交于
      AbstractMessageConverter and messaging template implementations now
      detect and use mutable headers if passed in.
      
      The SimpMessagingTemplate is optimized to supporting using a single
      MessageHeaders instance while preparing a message.
      
      This commit also updates code using the SimpMessagingTemplate to take
      advantage of its new capabilities.
      
      Issue: SPR-11468
      fda9c633
    • R
      Make use of enhanced MessageHeaderAccessor support · ae942ffd
      Rossen Stoyanchev 提交于
      Mutate rather than re-create headers when decoding STOMP messages
      before a message is sent on a message channel.
      
      Use MessageBuilder.createMessage to ensure the fully prepared
      MessageHeaders is used directly MessageHeaderAccessor instance.
      
      Issue: SPR-11468
      ae942ffd
    • R
      Enhance MessageHeaderAccessor support · 4867546a
      Rossen Stoyanchev 提交于
      Refine semantics of ID and TIMESTAMP headers provided to protected
      MessageHeaders constructor.
      
      Refactor internal implementation of MessageHeaderAccessor.
      
      Support mutating headers from a single thread while a message is being
      built (e.g. StompDecoder creating message + then adding session id).
      
      Improve immutablity in NativeMessageHeaderAccessor and in
      StompHeaderAccessor.
      
      Optimize object creation for initializing messages and subsequent
      accessing their headers.
      
      Introduce MessageHeaderAccessorFactory support to enable applying a
      common strategies for ID and TIMESTAMP generation to every message.
      
      Add MessageBuilder shortcut factory method for creating messages from
      payload and a full-prepared MessageHeaders instance. Also add
      equivalent constructors to GenericMessage and ErrorMessage.
      
      Issue: SPR-11468
      4867546a
  13. 05 4月, 2014 3 次提交
    • R
      Update MessageHeaders constructor · ddf87505
      Rossen Stoyanchev 提交于
      Following discussion with Gary.
      
      Issue: SPR-11468
      ddf87505
    • G
      Relax constraints in MessageHeaders for subclasses · 1eee339c
      Gary Russell 提交于
      Allow a subclass to modify MessageHeaders as well as override the
      strategy for or even skip having `ID` and `TIMESTAMP` headers.
      
      Issue: SPR-11468
      1eee339c
    • R
      Rename header for "orig" destination · 5e925ac0
      Rossen Stoyanchev 提交于
      The UserDestinationMessageHandler adds a header providing a hint for
      what the original destination a user may have used when subscribing.
      That is then used when writing messages back to WebSocket clients to
      ensure they dont see the internally used, transformed user destination.
      
      This change moves the header name constatn to make it more broadly
      applicable. For example SPR-11645.
      5e925ac0
  14. 04 4月, 2014 2 次提交
  15. 02 4月, 2014 1 次提交
  16. 28 3月, 2014 2 次提交
  17. 25 3月, 2014 8 次提交
    • S
      polishing · c1eb50ef
      Stephane Nicoll 提交于
      c1eb50ef
    • R
      Introduce base exception class for arg resolution · 2c1d5efb
      Rossen Stoyanchev 提交于
      Issue: SPR-11584
      2c1d5efb
    • S
      Improve MessageMethodArgumentResolver · 2aee0d82
      Stephane Nicoll 提交于
      This commit validates that the payload type of the message is
      assignable to the one declared in the method signature. If that
      is not the case, a meaningful exception message is thrown with
      the types mismatch.
      
      Prior to this commit, only the Message interface could be defined
      in the method signature: it is now possible to define a sub-class
      of Message if necessary which will match as long as the Message
      parameter is assignable to that type.
      
      Issue: SPR-11584
      2aee0d82
    • R
      Add WebSocket transport configuration support · c11484b2
      Rossen Stoyanchev 提交于
      Issue: SPR-11527
      c11484b2
    • R
      Polish StompDecoder and the new Buffering sub-class · 545c4eff
      Rossen Stoyanchev 提交于
      Issue: SPR-11527
      545c4eff
    • S
      Add configuration for message buffer size limit · bbdb72d8
      Sebastien Deleuze 提交于
      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
      bbdb72d8
    • R
      Add BufferingStompDecoder · ebffd67b
      Rossen Stoyanchev 提交于
      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
      ebffd67b
    • J
      Revised ResizableByteArrayOutputStream as an actual subclass of... · dd7f54c3
      Juergen Hoeller 提交于
      Revised ResizableByteArrayOutputStream as an actual subclass of ByteArrayOutputStream, and consistently applied appropriate ByteArrayOutputStream initial capacities across the codebase
      
      Issue: SPR-11594
      dd7f54c3