Search in sources :

Example 1 with RestTemplateXhrTransport

use of org.springframework.web.socket.sockjs.client.RestTemplateXhrTransport in project spring-boot by spring-projects.

the class WebSocketMessagingAutoConfigurationTests method setup.

@Before
public void setup() {
    List<Transport> transports = Arrays.asList(new WebSocketTransport(new StandardWebSocketClient(new WsWebSocketContainer())), new RestTemplateXhrTransport(new RestTemplate()));
    this.sockJsClient = new SockJsClient(transports);
}
Also used : RestTemplateXhrTransport(org.springframework.web.socket.sockjs.client.RestTemplateXhrTransport) WsWebSocketContainer(org.apache.tomcat.websocket.WsWebSocketContainer) SockJsClient(org.springframework.web.socket.sockjs.client.SockJsClient) RestTemplate(org.springframework.web.client.RestTemplate) StandardWebSocketClient(org.springframework.web.socket.client.standard.StandardWebSocketClient) Transport(org.springframework.web.socket.sockjs.client.Transport) WebSocketTransport(org.springframework.web.socket.sockjs.client.WebSocketTransport) RestTemplateXhrTransport(org.springframework.web.socket.sockjs.client.RestTemplateXhrTransport) WebSocketTransport(org.springframework.web.socket.sockjs.client.WebSocketTransport) Before(org.junit.Before)

Aggregations

WsWebSocketContainer (org.apache.tomcat.websocket.WsWebSocketContainer)1 Before (org.junit.Before)1 RestTemplate (org.springframework.web.client.RestTemplate)1 StandardWebSocketClient (org.springframework.web.socket.client.standard.StandardWebSocketClient)1 RestTemplateXhrTransport (org.springframework.web.socket.sockjs.client.RestTemplateXhrTransport)1 SockJsClient (org.springframework.web.socket.sockjs.client.SockJsClient)1 Transport (org.springframework.web.socket.sockjs.client.Transport)1 WebSocketTransport (org.springframework.web.socket.sockjs.client.WebSocketTransport)1