Class WebsocketRoutingFilter
- java.lang.Object
-
- org.springframework.cloud.gateway.filter.WebsocketRoutingFilter
-
- All Implemented Interfaces:
GlobalFilter
,org.springframework.core.Ordered
public class WebsocketRoutingFilter extends Object implements GlobalFilter, org.springframework.core.Ordered
- Author:
- Spencer Gibb, Nikita Konev
-
-
Field Summary
Fields Modifier and Type Field Description static String
SEC_WEBSOCKET_PROTOCOL
Sec-Websocket protocol.
-
Constructor Summary
Constructors Constructor Description WebsocketRoutingFilter(org.springframework.web.reactive.socket.client.WebSocketClient webSocketClient, org.springframework.web.reactive.socket.server.WebSocketService webSocketService, org.springframework.beans.factory.ObjectProvider<List<HttpHeadersFilter>> headersFiltersProvider)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description reactor.core.publisher.Mono<Void>
filter(org.springframework.web.server.ServerWebExchange exchange, GatewayFilterChain chain)
Process the Web request and (optionally) delegate to the nextGatewayFilter
through the givenGatewayFilterChain
.int
getOrder()
-
-
-
Field Detail
-
SEC_WEBSOCKET_PROTOCOL
public static final String SEC_WEBSOCKET_PROTOCOL
Sec-Websocket protocol.- See Also:
- Constant Field Values
-
-
Constructor Detail
-
WebsocketRoutingFilter
public WebsocketRoutingFilter(org.springframework.web.reactive.socket.client.WebSocketClient webSocketClient, org.springframework.web.reactive.socket.server.WebSocketService webSocketService, org.springframework.beans.factory.ObjectProvider<List<HttpHeadersFilter>> headersFiltersProvider)
-
-
Method Detail
-
getOrder
public int getOrder()
- Specified by:
getOrder
in interfaceorg.springframework.core.Ordered
-
filter
public reactor.core.publisher.Mono<Void> filter(org.springframework.web.server.ServerWebExchange exchange, GatewayFilterChain chain)
Description copied from interface:GlobalFilter
Process the Web request and (optionally) delegate to the nextGatewayFilter
through the givenGatewayFilterChain
.- Specified by:
filter
in interfaceGlobalFilter
- Parameters:
exchange
- the current server exchangechain
- provides a way to delegate to the next filter- Returns:
Mono<Void>
to indicate when request processing is complete
-
-