List of usage examples for org.springframework.web.reactive.socket.client ReactorNettyWebSocketClient ReactorNettyWebSocketClient
public ReactorNettyWebSocketClient()
From source file:org.springframework.cloud.gateway.test.websocket.WebSocketIntegrationTests.java
@Before public void setup() throws Exception { this.client = new ReactorNettyWebSocketClient(); this.server = new ReactorHttpServer(); this.server.setHandler(createHttpHandler()); this.server.afterPropertiesSet(); this.server.start(); // Set dynamically chosen port this.serverPort = this.server.getPort(); if (this.client instanceof Lifecycle) { ((Lifecycle) this.client).start(); }/*from w ww . j a v a 2s .c o m*/ this.gatewayContext = new SpringApplicationBuilder(GatewayConfig.class) .properties("ws.server.port:" + this.serverPort, "server.port=0", "spring.jmx.enabled=false").run(); ConfigurableEnvironment env = this.gatewayContext.getBean(ConfigurableEnvironment.class); this.gatewayPort = Integer.valueOf(env.getProperty("local.server.port")); }