Search in sources :

Example 6 with ReactorHttpServer

use of org.springframework.http.server.reactive.bootstrap.ReactorHttpServer in project spring-framework by spring-projects.

the class AbstractWebSocketIntegrationTests method arguments.

@Parameters(name = "client[{0}] - server [{1}]")
public static Object[][] arguments() throws IOException {
    Flux<? extends WebSocketClient> clients = Flux.concat(Flux.just(new StandardWebSocketClient()).repeat(5), Flux.just(new JettyWebSocketClient()).repeat(5), Flux.just(new ReactorNettyWebSocketClient()).repeat(5), Flux.just(new RxNettyWebSocketClient()).repeat(5), Flux.just(new UndertowWebSocketClient(Xnio.getInstance().createWorker(OptionMap.EMPTY))).repeat(5));
    Flux<? extends HttpServer> servers = Flux.just(new TomcatHttpServer(TMP_DIR.getAbsolutePath(), WsContextListener.class), new JettyHttpServer(), new ReactorHttpServer(), new RxNettyHttpServer(), new UndertowHttpServer()).repeat(5);
    Flux<? extends Class<?>> configs = Flux.just(TomcatConfig.class, JettyConfig.class, ReactorNettyConfig.class, RxNettyConfig.class, UndertowConfig.class).repeat(5);
    return Flux.zip(clients, servers, configs).map(Tuple3::toArray).collectList().block().toArray(new Object[25][2]);
}
Also used : RxNettyWebSocketClient(org.springframework.web.reactive.socket.client.RxNettyWebSocketClient) ReactorHttpServer(org.springframework.http.server.reactive.bootstrap.ReactorHttpServer) ReactorNettyWebSocketClient(org.springframework.web.reactive.socket.client.ReactorNettyWebSocketClient) StandardWebSocketClient(org.springframework.web.reactive.socket.client.StandardWebSocketClient) RxNettyHttpServer(org.springframework.http.server.reactive.bootstrap.RxNettyHttpServer) UndertowHttpServer(org.springframework.http.server.reactive.bootstrap.UndertowHttpServer) JettyWebSocketClient(org.springframework.web.reactive.socket.client.JettyWebSocketClient) TomcatHttpServer(org.springframework.http.server.reactive.bootstrap.TomcatHttpServer) UndertowWebSocketClient(org.springframework.web.reactive.socket.client.UndertowWebSocketClient) JettyHttpServer(org.springframework.http.server.reactive.bootstrap.JettyHttpServer) Parameters(org.junit.runners.Parameterized.Parameters)

Aggregations

ReactorHttpServer (org.springframework.http.server.reactive.bootstrap.ReactorHttpServer)6 Test (org.junit.Test)4 URI (java.net.URI)3 RestTemplate (org.springframework.web.client.RestTemplate)3 Before (org.junit.Before)2 HttpHandler (org.springframework.http.server.reactive.HttpHandler)2 UndertowHttpServer (org.springframework.http.server.reactive.bootstrap.UndertowHttpServer)2 After (org.junit.After)1 Parameters (org.junit.runners.Parameterized.Parameters)1 AnnotationConfigApplicationContext (org.springframework.context.annotation.AnnotationConfigApplicationContext)1 ClassPathResource (org.springframework.core.io.ClassPathResource)1 Resource (org.springframework.core.io.Resource)1 JettyHttpServer (org.springframework.http.server.reactive.bootstrap.JettyHttpServer)1 RxNettyHttpServer (org.springframework.http.server.reactive.bootstrap.RxNettyHttpServer)1 TomcatHttpServer (org.springframework.http.server.reactive.bootstrap.TomcatHttpServer)1 WebTestClient (org.springframework.test.web.reactive.server.WebTestClient)1 GET (org.springframework.web.reactive.function.server.RequestPredicates.GET)1 RouterFunctions (org.springframework.web.reactive.function.server.RouterFunctions)1 RouterFunctions.route (org.springframework.web.reactive.function.server.RouterFunctions.route)1 ServerResponse (org.springframework.web.reactive.function.server.ServerResponse)1