1. 23 3月, 2014 2 次提交
    • R
      Polish · 7651f83b
      Rossen Stoyanchev 提交于
      7651f83b
    • R
      Remove synchronized keywords from SockJsSession impls · 4028a3b0
      Rossen Stoyanchev 提交于
      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
      4028a3b0
  2. 20 3月, 2014 1 次提交
  3. 17 1月, 2014 1 次提交
    • R
      Write prelude on successive SockJS streaming requests · c1f3da08
      Rossen Stoyanchev 提交于
      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
      c1f3da08
  4. 08 12月, 2013 1 次提交
    • J
      Introduced SockJsSession interface and moved SockJsSessionFactory and... · 1f9b833c
      Juergen Hoeller 提交于
      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
      1f9b833c
  5. 03 12月, 2013 1 次提交
  6. 27 11月, 2013 1 次提交
    • P
      General polish of new 4.0 classes · 15698860
      Phillip Webb 提交于
      Apply consistent styling to new classes introduced in Spring 4.0.
      
      - Javadoc line wrapping, whitespace and formatting
      - General code whitespace
      - Consistent Assert.notNull messages
      15698860
  7. 30 10月, 2013 1 次提交
    • S
      Polish spring-websocket · 75e61cc9
      Sam Brannen 提交于
      - Removed unused imports
      - Organized imports
      - Deleted unused fields
      - Deleted unused local variables
      - Deleted unused private static classes
      75e61cc9
  8. 29 10月, 2013 2 次提交
    • R
      Update WebSocket extensions change · 81dda069
      Rossen Stoyanchev 提交于
      - add WebSocketHttpHeaders
      - client-side support for WebSocket extensions
      - DefaultHandshakeHandler updates
      - replace use of ServletAttributes in JettyRequestUpgradeStratey
      - upgrade spring-web to jetty 9.0.5
      81dda069
    • B
      Add support for WebSocket Protocol Extensions · 6d00a3f0
      Brian Clozel 提交于
      This commits adds simple, overridable WebSocket Extension
      filtering during the handshake phase and adds that
      information in the WebSocket session.
      
      The actual WebSocket Extension negotiation happens
      within the server implementation (Glassfish, Jetty, Tomcat...),
      so one can only remove requested extensions from
      the list provided by the WebSocket client.
      
      See RFC6455 Section 9.
      
      Issue: SPR-10843
      6d00a3f0
  9. 30 9月, 2013 1 次提交
  10. 23 8月, 2013 1 次提交
  11. 14 8月, 2013 2 次提交
    • R
      Add HandshakeInterceptor · 319f18dd
      Rossen Stoyanchev 提交于
      A HandshakeInterceptor can be used to intercept WebSocket handshakes
      (or SockJS requests where a new session is created) in order to
      inspect the request and response before and after the handshake
      including the ability to pass attributes to the WebSocketHandler,
      which the hander can access through
      WebSocketSession.getHandshakeAttributes()
      
      An HttpSessionHandshakeInterceptor is available that can copy
      attributes from the HTTP session to make them available to the
      WebSocket session.
      
      Issue: SPR-10624
      319f18dd
    • R
      Polish WebSocketSession · 01feae0a
      Rossen Stoyanchev 提交于
      Update methods available on WebSocketSession interface.
      Introduce DelegatingWebSocketSession interface.
      01feae0a
  12. 03 8月, 2013 3 次提交
  13. 01 8月, 2013 1 次提交
  14. 28 7月, 2013 1 次提交
  15. 28 6月, 2013 1 次提交
  16. 15 5月, 2013 2 次提交
  17. 14 5月, 2013 1 次提交
  18. 06 5月, 2013 1 次提交
  19. 03 5月, 2013 1 次提交
    • R
      Refactor packages · 97d225ba
      Rossen Stoyanchev 提交于
      org.springframework.websocket  -> org.springframework.web.socket
      org.springframework.sockjs     -> org.springframework.web.socket.sockjs
      
      Flatten .sockjs and .sockjs.server
      97d225ba
  20. 02 5月, 2013 1 次提交
    • R
      Update exception handling · 166ca7a5
      Rossen Stoyanchev 提交于
      Allow WebSocketHandler methods to raise an exception.
      
      By default we install ExceptionWebSocketHandlerDecorator, which logs
      unhandled exceptions and closes the session. That decorator can be
      extended or replaced.
      
      Any exceptions that remain unhandled still (i.e. no exception handling
      decorator), are caught in the lowest level before propagating to the
      WebSocket engine or a SockJS transport handler and handled the same
      way. That means default behavior is guaranteed but also fully
      customizable.
      166ca7a5
  21. 27 4月, 2013 3 次提交
  22. 26 4月, 2013 2 次提交
    • P
      Javadocs and general formatting polish · db2c2480
      Phillip Webb 提交于
      db2c2480
    • R
      Tighten up exception handling strategy · 8200601a
      Rossen Stoyanchev 提交于
      WebSocketHandler implementations:
      - methods must deal with exceptions locally
      - uncaught runtime exceptions are handled by ending the session
      - transport errors (websocket engine) are passed into handleError
      
      WebSocketSession methods may raise IOException
      
      SockJS implementation of WebSocketHandler:
      - delegate SockJS transport errors into handleError
      - stop runtime exceptions from user WebSocketHandler and end session
      
      SockJsServce and TransportHandlers:
      - raise IOException or TransportErrorException
      
      HandshakeHandler:
      - raise IOException
      8200601a
  23. 23 4月, 2013 2 次提交
    • R
      Add HandlerProvider interface · 84089bf3
      Rossen Stoyanchev 提交于
      HandlerProvider is now an interface that can be used to plug in
      WebSocket handlers with per-connection scope semantics. There are two
      implementations, of the interface, one simple and a second that creates
      handler instances through AutowireCapableBeanFactory.
      
      HandlerProvider also provides a destroy method that is used to
      apply a destroy callback whenever a client connection closes.
      84089bf3
    • R
      Add WebSocketMessage and WebSocketHandler sub-interfcs · f9078c94
      Rossen Stoyanchev 提交于
      There is now a WebSocketMessage type with TextMessage and BinaryMessage
      sub-types. WebSocketHandler is also sub-divided into TextMessageHandler
      and BinaryMessageHandler, so that applications can choose to handle
      text, binary, or both.
      
      Also in this commit, the SockJsHandler and SockJsSession interfaces
      have been removed. SockJsService now accepts WebSocketHandler.
      f9078c94
  24. 19 4月, 2013 1 次提交
  25. 17 4月, 2013 2 次提交
  26. 15 4月, 2013 4 次提交
    • R
      Refactor SockJS and WebSocket layer configuration · 177e0821
      Rossen Stoyanchev 提交于
      Add HandlerProvider<T> class
      Modify HandshakeHandler to accept + adapt WebSocketHandler at runtime
      Modify SockJsService to accept + adapt SockJsHandler at runtime
      177e0821
    • R
      Add flush method to ServerHttpResponse · 3a2c15b0
      Rossen Stoyanchev 提交于
      This is useful to make sure response headers are written to the
      underlying response. It is also useful in conjunction with long
      running, async requests and HTTP streaming, to ensure the Servlet
      response buffer is sent to the client without additional delay and
      also causes an IOException to be raised if the client has gone away.
      3a2c15b0
    • R
      Refactor SockJS code · 6bd63112
      Rossen Stoyanchev 提交于
      - configure SockJS handler by type (as well as by instance)
      - add method to obtain SockJS handler instance via SockJsConfiguration
      - detect presense of jsr-356 and use it if available
      6bd63112
    • R
      Add first cut of SockJS server support · 88447e50
      Rossen Stoyanchev 提交于
      88447e50