Polish WebSocket-related

This commit is contained in:
Rossen Stoyanchev
2017-11-13 18:14:57 -05:00
parent c30145d6f9
commit e818b904ad
4 changed files with 14 additions and 16 deletions

View File

@@ -23,6 +23,7 @@ import org.springframework.web.reactive.socket.HandshakeInfo;
import org.springframework.web.reactive.socket.adapter.StandardWebSocketSession;
import org.springframework.web.reactive.socket.adapter.TomcatWebSocketSession;
import org.apache.tomcat.websocket.WsWebSocketContainer;
import reactor.core.publisher.MonoProcessor;
/**
@@ -35,6 +36,7 @@ public class TomcatWebSocketClient extends StandardWebSocketClient {
public TomcatWebSocketClient() {
this(new WsWebSocketContainer());
}
public TomcatWebSocketClient(WebSocketContainer webSocketContainer) {

View File

@@ -46,6 +46,7 @@ public interface RequestUpgradeStrategy {
* @return completion {@code Mono<Void>} to indicate the outcome of the
* WebSocket session handling.
*/
Mono<Void> upgrade(ServerWebExchange exchange, WebSocketHandler webSocketHandler, @Nullable String subProtocol);
Mono<Void> upgrade(ServerWebExchange exchange, WebSocketHandler webSocketHandler,
@Nullable String subProtocol);
}

View File

@@ -92,7 +92,7 @@ public abstract class AbstractWebSocketIntegrationTests {
public static Object[][] arguments() throws IOException {
WebSocketClient[] clients = new WebSocketClient[] {
new TomcatWebSocketClient(new WsWebSocketContainer()),
new TomcatWebSocketClient(),
new JettyWebSocketClient(),
new ReactorNettyWebSocketClient(),
new UndertowWebSocketClient(Xnio.getInstance().createWorker(OptionMap.EMPTY))