Java Code Examples for org.springframework.boot.web.reactive.server.ReactiveWebServerFactory

The following examples show how to use org.springframework.boot.web.reactive.server.ReactiveWebServerFactory. These examples are extracted from open source projects. 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 Project: pitchfork   Source File:    License: Apache License 2.0 5 votes vote down vote up
 * Since we're impersonating a {@code Zipkin} server we need to support the same set of features.
 * One of the features is request compression, which we handle here by adding a {@link HttpContentDecompressor} to the {@code Netty} pipeline.
public ReactiveWebServerFactory reactiveWebServerFactory() {
    NettyReactiveWebServerFactory factory = new NettyReactiveWebServerFactory();

    factory.addServerCustomizers(builder -> builder
            .tcpConfiguration(tcpServer -> {
                return tcpServer.doOnConnection(connection -> connection.addHandler("decompressor", new HttpContentDecompressor()));

    return factory;
Example 2
private static void runServer(ReactiveWebServerFactory factory,
                              HttpHandler httpHandler,
                              Consumer<WebServer> validator) {
    final WebServer server = factory.getWebServer(httpHandler);
    try {
    } finally {
Example 3
Source Project: feign-reactive   Source File:    License: Apache License 2.0 4 votes vote down vote up
public ReactiveWebServerFactory reactiveWebServerFactory(){
	return new NettyReactiveWebServerFactory();
Example 4
private static void runEchoServer(ReactiveWebServerFactory factory,
                                  Consumer<WebServer> validator) {
    runServer(factory, EchoHandler.INSTANCE, validator);