use of org.apache.tomcat.websocket.WsWebSocketContainer 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);
}
use of org.apache.tomcat.websocket.WsWebSocketContainer in project spring-boot by spring-projects.
the class WebSocketMessagingAutoConfigurationTests method setup.
@BeforeEach
void setup() {
List<Transport> transports = Arrays.asList(new WebSocketTransport(new StandardWebSocketClient(new WsWebSocketContainer())), new RestTemplateXhrTransport(new RestTemplate()));
this.sockJsClient = new SockJsClient(transports);
}
use of org.apache.tomcat.websocket.WsWebSocketContainer in project spring-boot by spring-projects.
the class LiveReloadServerTests method connect.
private LiveReloadWebSocketHandler connect() throws Exception {
WebSocketClient client = new StandardWebSocketClient(new WsWebSocketContainer());
LiveReloadWebSocketHandler handler = new LiveReloadWebSocketHandler();
client.doHandshake(handler, "ws://localhost:" + this.port + "/livereload");
handler.awaitHello();
return handler;
}
use of org.apache.tomcat.websocket.WsWebSocketContainer in project spring-boot by spring-projects.
the class LiveReloadServerTests method connect.
private LiveReloadWebSocketHandler connect(Function<WebSocketContainer, WebSocketClient> clientFactory) throws Exception {
WsWebSocketContainer webSocketContainer = new WsWebSocketContainer();
WebSocketClient client = clientFactory.apply(webSocketContainer);
LiveReloadWebSocketHandler handler = new LiveReloadWebSocketHandler();
client.doHandshake(handler, "ws://localhost:" + this.port + "/livereload");
handler.awaitHello();
return handler;
}
Aggregations