Java Code Examples for reactor.ipc.netty.http.server.HttpServer#create()

The following examples show how to use reactor.ipc.netty.http.server.HttpServer#create() . 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: Server.java    From Building-RESTful-Web-Services-with-Spring-5-Second-Edition with MIT License 5 votes vote down vote up
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 2
Source File: Server.java    From Building-RESTful-Web-Services-with-Spring-5-Second-Edition with MIT License 5 votes vote down vote up
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 3
Source File: HttpServerConfig.java    From Spring-5.0-Cookbook with MIT License 5 votes vote down vote up
@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 4
Source File: HttpServerConfig.java    From Spring-5.0-Cookbook with MIT License 5 votes vote down vote up
@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 vote down vote up
@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 6
Source File: HttpServerConfig.java    From Spring-5.0-Cookbook with MIT License 5 votes vote down vote up
@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 7
Source File: HttpServerConfig.java    From Spring-5.0-Cookbook with MIT License 5 votes vote down vote up
@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 8
Source File: HttpServerConfig.java    From Spring-5.0-Cookbook with MIT License 5 votes vote down vote up
@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 9
Source File: HttpServerConfig.java    From Spring-5.0-Cookbook with MIT License 5 votes vote down vote up
@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 10
Source File: HttpServerConfig.java    From Spring-5.0-Cookbook with MIT License 5 votes vote down vote up
@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 11
Source File: HttpServerConfig.java    From Spring-5.0-Cookbook with MIT License 5 votes vote down vote up
@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 12
Source File: HttpServerConfig.java    From Spring-5.0-Cookbook with MIT License 5 votes vote down vote up
@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 13
Source File: HttpServerConfig.java    From Spring-5.0-Cookbook with MIT License 5 votes vote down vote up
@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 14
Source File: HttpServerConfig.java    From Spring-5.0-Cookbook with MIT License 5 votes vote down vote up
@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 15
Source File: HttpServerConfig.java    From Spring-5.0-Cookbook with MIT License 5 votes vote down vote up
@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: Application.java    From spring-security-reactive with Apache License 2.0 5 votes vote down vote up
@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();
}