use of org.springframework.web.socket.handler.AbstractWebSocketHandler in project spring-framework by spring-projects.
the class WebSocketConfigurationTests method registerWebSocketHandler.
@Test
public void registerWebSocketHandler() throws Exception {
WebSocketSession session = this.webSocketClient.doHandshake(new AbstractWebSocketHandler() {
}, getWsBaseUrl() + "/ws").get();
TestHandler serverHandler = this.wac.getBean(TestHandler.class);
assertTrue(serverHandler.connectLatch.await(2, TimeUnit.SECONDS));
session.close();
}
use of org.springframework.web.socket.handler.AbstractWebSocketHandler in project spring-framework by spring-projects.
the class StandardWebSocketClientTests method setup.
@Before
public void setup() {
this.headers = new WebSocketHttpHeaders();
this.wsHandler = new AbstractWebSocketHandler() {
};
this.wsContainer = mock(WebSocketContainer.class);
this.wsClient = new StandardWebSocketClient(this.wsContainer);
}
use of org.springframework.web.socket.handler.AbstractWebSocketHandler in project spring-framework by spring-projects.
the class WebSocketConfigurationTests method registerWebSocketHandlerWithSockJS.
@Test
public void registerWebSocketHandlerWithSockJS() throws Exception {
WebSocketSession session = this.webSocketClient.doHandshake(new AbstractWebSocketHandler() {
}, getWsBaseUrl() + "/sockjs/websocket").get();
TestHandler serverHandler = this.wac.getBean(TestHandler.class);
assertTrue(serverHandler.connectLatch.await(2, TimeUnit.SECONDS));
session.close();
}
Aggregations