reactor.ipc.netty.http.server.HttpServer Java Examples
The following examples show how to use
reactor.ipc.netty.http.server.HttpServer.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: WebFluxIT.java From glowroot with Apache License 2.0 | 6 votes |
@Override public void executeApp() throws Exception { int port = getAvailablePort(); NettyContext nettyContext = HttpServer.create("localhost", port) .newHandler(new ReactorHttpHandlerAdapter(new MyHttpHandler())) .block(); WebClient client = WebClient.create("http://localhost:" + port); client.get() .uri("/webflux/abc") .retrieve() .bodyToMono(String.class) .block(); nettyContext.dispose(); }
Example #2
Source File: HttpServerConfig.java From Spring-5.0-Cookbook with MIT License | 5 votes |
@Bean public NettyContext nettyContext(ApplicationContext context) { HttpHandler handler = DispatcherHandler.toHttpHandler(context); ReactorHttpHandlerAdapter adapter = new ReactorHttpHandlerAdapter(handler); HttpServer httpServer = HttpServer.create("localhost", Integer.valueOf("8909")); return httpServer.newHandler(adapter).block(); }
Example #3
Source File: Application.java From spring-security-reactive with Apache License 2.0 | 5 votes |
@Bean public NettyContext nettyContext(ApplicationContext context) { HttpHandler handler = DispatcherHandler.toHttpHandler(context); ReactorHttpHandlerAdapter adapter = new ReactorHttpHandlerAdapter(handler); HttpServer httpServer = HttpServer.create("localhost", port); return httpServer.newHandler(adapter).block(); }
Example #4
Source File: HttpServerConfig.java From Spring-5.0-Cookbook with MIT License | 5 votes |
@Bean public NettyContext nettyContext(ApplicationContext context) { HttpHandler handler = DispatcherHandler.toHttpHandler(context); ReactorHttpHandlerAdapter adapter = new ReactorHttpHandlerAdapter(handler); HttpServer httpServer = HttpServer.create("localhost", Integer.valueOf("8908")); return httpServer.newHandler(adapter).block(); }
Example #5
Source File: HttpServerConfig.java From Spring-5.0-Cookbook with MIT License | 5 votes |
@Bean public NettyContext nettyContext(ApplicationContext context) { HttpHandler handler = DispatcherHandler.toHttpHandler(context); ReactorHttpHandlerAdapter adapter = new ReactorHttpHandlerAdapter(handler); HttpServer httpServer = HttpServer.create("localhost", Integer.valueOf("9008")); return httpServer.newHandler(adapter).block(); }
Example #6
Source File: HttpServerConfig.java From Spring-5.0-Cookbook with MIT License | 5 votes |
@Bean public NettyContext nettyContext(ApplicationContext context) { HttpHandler handler = DispatcherHandler.toHttpHandler(context); ReactorHttpHandlerAdapter adapter = new ReactorHttpHandlerAdapter(handler); HttpServer httpServer = HttpServer.create("localhost", Integer.valueOf("8095")); return httpServer.newHandler(adapter).block(); }
Example #7
Source File: HttpServerConfig.java From Spring-5.0-Cookbook with MIT License | 5 votes |
@Bean public NettyContext nettyContext(ApplicationContext context) { HttpHandler handler = DispatcherHandler.toHttpHandler(context); ReactorHttpHandlerAdapter adapter = new ReactorHttpHandlerAdapter(handler); HttpServer httpServer = HttpServer.create("localhost", Integer.valueOf("8901")); return httpServer.newHandler(adapter).block(); }
Example #8
Source File: HttpServerConfig.java From Spring-5.0-Cookbook with MIT License | 5 votes |
@Bean public NettyContext nettyContext(ApplicationContext context) { HttpHandler handler = DispatcherHandler.toHttpHandler(context); ReactorHttpHandlerAdapter adapter = new ReactorHttpHandlerAdapter(handler); HttpServer httpServer = HttpServer.create("localhost", Integer.valueOf("9008")); return httpServer.newHandler(adapter).block(); }
Example #9
Source File: HttpServerConfig.java From Spring-5.0-Cookbook with MIT License | 5 votes |
@Bean public NettyContext nettyContext(ApplicationContext context) { HttpHandler handler = DispatcherHandler.toHttpHandler(context); ReactorHttpHandlerAdapter adapter = new ReactorHttpHandlerAdapter(handler); HttpServer httpServer = HttpServer.create("localhost", Integer.valueOf("8125")); return httpServer.newHandler(adapter).block(); }
Example #10
Source File: Server.java From Building-RESTful-Web-Services-with-Spring-5-Second-Edition with MIT License | 5 votes |
public void startReactorServer() throws InterruptedException { RouterFunction<ServerResponse> route = routingFunction(); HttpHandler httpHandler = toHttpHandler(route); ReactorHttpHandlerAdapter adapter = new ReactorHttpHandlerAdapter(httpHandler); HttpServer server = HttpServer.create(HOST, PORT); server.newHandler(adapter).block(); }
Example #11
Source File: HttpServerConfig.java From Spring-5.0-Cookbook with MIT License | 5 votes |
@Bean public NettyContext nettyContext(ApplicationContext context) { HttpHandler handler = DispatcherHandler.toHttpHandler(context); ReactorHttpHandlerAdapter adapter = new ReactorHttpHandlerAdapter(handler); HttpServer httpServer = HttpServer.create("localhost", Integer.valueOf("8901")); return httpServer.newHandler(adapter).block(); }
Example #12
Source File: HttpServerConfig.java From Spring-5.0-Cookbook with MIT License | 5 votes |
@Bean public NettyContext nettyContext(ApplicationContext context) { HttpHandler handler = DispatcherHandler.toHttpHandler(context); ReactorHttpHandlerAdapter adapter = new ReactorHttpHandlerAdapter(handler); HttpServer httpServer = HttpServer.create("localhost", Integer.valueOf("9006")); return httpServer.newHandler(adapter).block(); }
Example #13
Source File: HttpServerConfig.java From Spring-5.0-Cookbook with MIT License | 5 votes |
@Bean public NettyContext nettyContext(ApplicationContext context) { HttpHandler handler = DispatcherHandler.toHttpHandler(context); ReactorHttpHandlerAdapter adapter = new ReactorHttpHandlerAdapter(handler); HttpServer httpServer = HttpServer.create("localhost", Integer.valueOf("9007")); return httpServer.newHandler(adapter).block(); }
Example #14
Source File: HttpServerConfig.java From Spring-5.0-Cookbook with MIT License | 5 votes |
@Bean public NettyContext nettyContext(ApplicationContext context) { HttpHandler handler = DispatcherHandler.toHttpHandler(context); ReactorHttpHandlerAdapter adapter = new ReactorHttpHandlerAdapter(handler); HttpServer httpServer = HttpServer.create("localhost", Integer.valueOf("8901")); return httpServer.newHandler(adapter).block(); }
Example #15
Source File: HttpServerConfig.java From Spring-5.0-Cookbook with MIT License | 5 votes |
@Bean public NettyContext nettyContext(ApplicationContext context) { HttpHandler handler = DispatcherHandler.toHttpHandler(context); ReactorHttpHandlerAdapter adapter = new ReactorHttpHandlerAdapter(handler); HttpServer httpServer = HttpServer.create("localhost", Integer.valueOf("8908")); return httpServer.newHandler(adapter).block(); }
Example #16
Source File: HttpServerConfig.java From Spring-5.0-Cookbook with MIT License | 5 votes |
@Bean public NettyContext nettyContext(ApplicationContext context) { HttpHandler handler = DispatcherHandler.toHttpHandler(context); ReactorHttpHandlerAdapter adapter = new ReactorHttpHandlerAdapter(handler); HttpServer httpServer = HttpServer.create("localhost", Integer.valueOf("8095")); return httpServer.newHandler(adapter).block(); }
Example #17
Source File: Server.java From Building-RESTful-Web-Services-with-Spring-5-Second-Edition with MIT License | 5 votes |
public void startReactorServer() throws InterruptedException { RouterFunction<ServerResponse> route = routingFunction(); HttpHandler httpHandler = toHttpHandler(route); ReactorHttpHandlerAdapter adapter = new ReactorHttpHandlerAdapter(httpHandler); HttpServer server = HttpServer.create(HOST, PORT); server.newHandler(adapter).block(); }