Class CachedBodyOutputMessage
- java.lang.Object
-
- org.springframework.cloud.gateway.filter.factory.rewrite.CachedBodyOutputMessage
-
- All Implemented Interfaces:
org.springframework.http.HttpMessage
,org.springframework.http.ReactiveHttpOutputMessage
public class CachedBodyOutputMessage extends Object implements org.springframework.http.ReactiveHttpOutputMessage
Implementation ofClientHttpRequest
that saves body as a field.
-
-
Constructor Summary
Constructors Constructor Description CachedBodyOutputMessage(org.springframework.web.server.ServerWebExchange exchange, org.springframework.http.HttpHeaders httpHeaders)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
beforeCommit(Supplier<? extends reactor.core.publisher.Mono<Void>> action)
org.springframework.core.io.buffer.DataBufferFactory
bufferFactory()
reactor.core.publisher.Flux<org.springframework.core.io.buffer.DataBuffer>
getBody()
Return the request body, or an error stream if the body was never set or when.org.springframework.http.HttpHeaders
getHeaders()
boolean
isCommitted()
reactor.core.publisher.Mono<Void>
setComplete()
reactor.core.publisher.Mono<Void>
writeAndFlushWith(org.reactivestreams.Publisher<? extends org.reactivestreams.Publisher<? extends org.springframework.core.io.buffer.DataBuffer>> body)
reactor.core.publisher.Mono<Void>
writeWith(org.reactivestreams.Publisher<? extends org.springframework.core.io.buffer.DataBuffer> body)
-
-
-
Method Detail
-
beforeCommit
public void beforeCommit(Supplier<? extends reactor.core.publisher.Mono<Void>> action)
- Specified by:
beforeCommit
in interfaceorg.springframework.http.ReactiveHttpOutputMessage
-
isCommitted
public boolean isCommitted()
- Specified by:
isCommitted
in interfaceorg.springframework.http.ReactiveHttpOutputMessage
-
getHeaders
public org.springframework.http.HttpHeaders getHeaders()
- Specified by:
getHeaders
in interfaceorg.springframework.http.HttpMessage
-
bufferFactory
public org.springframework.core.io.buffer.DataBufferFactory bufferFactory()
- Specified by:
bufferFactory
in interfaceorg.springframework.http.ReactiveHttpOutputMessage
-
getBody
public reactor.core.publisher.Flux<org.springframework.core.io.buffer.DataBuffer> getBody()
Return the request body, or an error stream if the body was never set or when.- Returns:
- body as
Flux
-
writeWith
public reactor.core.publisher.Mono<Void> writeWith(org.reactivestreams.Publisher<? extends org.springframework.core.io.buffer.DataBuffer> body)
- Specified by:
writeWith
in interfaceorg.springframework.http.ReactiveHttpOutputMessage
-
writeAndFlushWith
public reactor.core.publisher.Mono<Void> writeAndFlushWith(org.reactivestreams.Publisher<? extends org.reactivestreams.Publisher<? extends org.springframework.core.io.buffer.DataBuffer>> body)
- Specified by:
writeAndFlushWith
in interfaceorg.springframework.http.ReactiveHttpOutputMessage
-
setComplete
public reactor.core.publisher.Mono<Void> setComplete()
- Specified by:
setComplete
in interfaceorg.springframework.http.ReactiveHttpOutputMessage
-
-