1. 22 3月, 2019 1 次提交
  2. 29 7月, 2015 1 次提交
    • R
      Simplify use of headers for SockJsClient requests · b7bdd724
      Rossen Stoyanchev 提交于
      Before this change, XhrTransport implementations had to be configured
      with the headers to use for HTTP requests other than the initial
      handshake.
      
      After this change the handshake headers passed to SockJsClient by
      default are used for all other HTTP requests related to the SockJS
      connection (e.g. info request, xhr send/receive). A property on
      SockJsClient allows restricting the headers to use for other HTTP
      requests to a subset of the handshake headers.
      
      Issue: SPR-13254
      b7bdd724
  3. 19 5月, 2015 1 次提交
  4. 01 11月, 2014 1 次提交
  5. 21 10月, 2014 1 次提交
  6. 26 6月, 2014 1 次提交
    • R
      Add SockJS client · e82df99a
      Rossen Stoyanchev 提交于
      This change adds a new implementation of WebSocketClient that can
      connect to a SockJS server using one of the SockJS transports
      "websocket", "xhr_streaming", or "xhr". From a client perspective
      there is no implementation difference between "xhr_streaming" and
      "xhr". Just keep receiving and when the response is complete,
      start over. Other SockJS transports are browser specific
      and therefore not relevant in Java ("eventsource", "htmlfile" or
      iframe based variations).
      
      The client loosely mimics the behavior of the JavaScript SockJS client.
      First it sends an info request to find the server capabilities,
      then it tries to connect with each configured transport, falling
      back, or forcing a timeout and then falling back, until one of the
      configured transports succeeds.
      
      The WebSocketTransport can be configured with any Spring Framework
      WebSocketClient implementation (currently JSR-356 or Jetty 9).
      
      The XhrTransport currently has a RestTemplate-based and a Jetty
      HttpClient-based implementations. To use those to simulate a large
      number of users be sure to configure Jetty's HttpClient executor
      and maxConnectionsPerDestination to high numbers. The same is true
      for whichever underlying HTTP library is used with the RestTemplate
      (e.g. maxConnPerRoute and maxConnTotal in Apache HttpComponents).
      
      Issue: SPR-10797
      e82df99a