Example usage for org.springframework.http.server.reactive UndertowServerHttpRequest UndertowServerHttpRequest

List of usage examples for org.springframework.http.server.reactive UndertowServerHttpRequest UndertowServerHttpRequest

Introduction

In this page you can find the example usage for org.springframework.http.server.reactive UndertowServerHttpRequest UndertowServerHttpRequest.

Prototype

public UndertowServerHttpRequest(HttpServerExchange exchange, DataBufferFactory bufferFactory)
            throws URISyntaxException 

Source Link

Usage

From source file:org.springframework.http.server.reactive.UndertowHttpHandlerAdapter.java

@Override
public void handleRequest(HttpServerExchange exchange) throws Exception {

    ServerHttpRequest request = new UndertowServerHttpRequest(exchange, getDataBufferFactory());
    ServerHttpResponse response = new UndertowServerHttpResponse(exchange, getDataBufferFactory());

    if (HttpMethod.HEAD.equals(request.getMethod())) {
        response = new HttpHeadResponseDecorator(response);
    }/*from ww  w.j av  a2 s .  co m*/

    HandlerResultSubscriber resultSubscriber = new HandlerResultSubscriber(exchange);
    this.httpHandler.handle(request, response).subscribe(resultSubscriber);
}