Interface InfoReceiver

All Known Subinterfaces:
XhrTransport
All Known Implementing Classes:
AbstractXhrTransport, JettyXhrTransport, RestTemplateXhrTransport, UndertowXhrTransport

public interface InfoReceiver
A component that can execute the SockJS "Info" request that needs to be performed before the SockJS session starts in order to check server endpoint capabilities such as whether the endpoint permits use of WebSocket.

Typically XhrTransport implementations are also implementations of this contract.

Since:
4.1
Author:
Rossen Stoyanchev
See Also:
  • Method Summary

    Modifier and Type
    Method
    Description
    executeInfoRequest(URI infoUrl, HttpHeaders headers)
    Perform an HTTP request to the SockJS "Info" URL.
  • Method Details

    • executeInfoRequest

      String executeInfoRequest(URI infoUrl, @Nullable HttpHeaders headers)
      Perform an HTTP request to the SockJS "Info" URL. and return the resulting JSON response content, or raise an exception.

      Note that as of 4.2 this method accepts a headers parameter.

      Parameters:
      infoUrl - the URL to obtain SockJS server information from
      headers - the headers to use for the request
      Returns:
      the body of the response