public class AsityHandlerFunction extends Object implements HandlerFunction<ServerResponse>
SpringWebFluxServerHttpExchange.
AsityHandlerFunction asityHandlerFunction = new AsityHandlerFunction().on(http -> {});
RouterFunction<ServerResponse> routes = RouterFunctions.route(
path("/cettia")
// To exclude WebSocket handshake requests
.and(headers(headers -> !"websocket".equalsIgnoreCase(headers.asHttpHeaders().getUpgrade()))),
asityHandlerFunction);
| Constructor and Description |
|---|
AsityHandlerFunction() |
| Modifier and Type | Method and Description |
|---|---|
Mono<ServerResponse> |
handle(ServerRequest request) |
AsityHandlerFunction |
onhttp(Action<ServerHttpExchange> action)
Registers an action to be called when
ServerHttpExchange is available. |
public Mono<ServerResponse> handle(ServerRequest request)
handle in interface HandlerFunction<ServerResponse>public AsityHandlerFunction onhttp(Action<ServerHttpExchange> action)
ServerHttpExchange is available.Copyright © 2015–2018. All rights reserved.