Class NettyWriteResponseFilter
- java.lang.Object
-
- org.springframework.cloud.gateway.filter.NettyWriteResponseFilter
-
- All Implemented Interfaces:
GlobalFilter,org.springframework.core.Ordered
public class NettyWriteResponseFilter extends Object implements GlobalFilter, org.springframework.core.Ordered
- Author:
- Spencer Gibb
-
-
Field Summary
Fields Modifier and Type Field Description static intWRITE_RESPONSE_FILTER_ORDEROrder for write response filter.
-
Constructor Summary
Constructors Constructor Description NettyWriteResponseFilter(List<org.springframework.http.MediaType> streamingMediaTypes)
-
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 nextGatewayFilterthrough the givenGatewayFilterChain.intgetOrder()protected org.springframework.core.io.buffer.DataBufferwrap(io.netty.buffer.ByteBuf byteBuf, org.springframework.http.server.reactive.ServerHttpResponse response)
-
-
-
Field Detail
-
WRITE_RESPONSE_FILTER_ORDER
public static final int WRITE_RESPONSE_FILTER_ORDER
Order for write response filter.- See Also:
- Constant Field Values
-
-
Constructor Detail
-
NettyWriteResponseFilter
public NettyWriteResponseFilter(List<org.springframework.http.MediaType> streamingMediaTypes)
-
-
Method Detail
-
getOrder
public int getOrder()
- Specified by:
getOrderin interfaceorg.springframework.core.Ordered
-
filter
public reactor.core.publisher.Mono<Void> filter(org.springframework.web.server.ServerWebExchange exchange, GatewayFilterChain chain)
Description copied from interface:GlobalFilterProcess the Web request and (optionally) delegate to the nextGatewayFilterthrough the givenGatewayFilterChain.- Specified by:
filterin 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
-
wrap
protected org.springframework.core.io.buffer.DataBuffer wrap(io.netty.buffer.ByteBuf byteBuf, org.springframework.http.server.reactive.ServerHttpResponse response)
-
-