use of org.springframework.web.reactive.socket.server.support.WebSocketHandlerAdapter in project spring-framework by spring-projects.
the class WebFluxConfigurationSupport method webFluxWebSocketHandlerAdapter.
@Bean
public WebSocketHandlerAdapter webFluxWebSocketHandlerAdapter() {
WebSocketHandlerAdapter adapter = new WebSocketHandlerAdapter(initWebSocketService());
// Lower the (default) priority for now, for backwards compatibility
int defaultOrder = adapter.getOrder();
adapter.setOrder(defaultOrder + 1);
return adapter;
}
use of org.springframework.web.reactive.socket.server.support.WebSocketHandlerAdapter in project spring-framework by spring-projects.
the class DelegatingWebFluxConfigurationTests method webSocketService.
@Test
void webSocketService() {
WebSocketService service = mock(WebSocketService.class);
given(webFluxConfigurer.getWebSocketService()).willReturn(service);
delegatingConfig.setConfigurers(Collections.singletonList(webFluxConfigurer));
WebSocketHandlerAdapter adapter = delegatingConfig.webFluxWebSocketHandlerAdapter();
assertThat(adapter.getWebSocketService()).isSameAs(service);
}
Aggregations