Class JaxRsResult<T>
java.lang.Object
se.fortnox.reactivewizard.jaxrs.response.JaxRsResult<T>
- Direct Known Subclasses:
JaxRsStreamingResult
Represents a result of a call to a JaxRs resource. Contains the output but also some meta data about the call.
This class is passed to the output processors.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected static final byte[]protected static final reactor.core.publisher.Mono<byte[]>protected reactor.core.publisher.Flux<T>protected io.netty.handler.codec.http.HttpResponseStatusprotected final rx.functions.Func1<reactor.core.publisher.Flux<T>,reactor.core.publisher.Flux<byte[]>> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiondoOnOutput(rx.functions.Action1<T> action) io.netty.handler.codec.http.HttpResponseStatusorg.reactivestreams.Publisher<Void>write(reactor.netty.http.server.HttpServerResponse response) Write the response.
-
Field Details
-
EMPTY_RESPONSE
protected static final byte[] EMPTY_RESPONSE -
EMPTY_RESPONSE_MONO
protected static final reactor.core.publisher.Mono<byte[]> EMPTY_RESPONSE_MONO -
serializer
protected final rx.functions.Func1<reactor.core.publisher.Flux<T>,reactor.core.publisher.Flux<byte[]>> serializer -
headers
-
output
-
responseStatus
protected io.netty.handler.codec.http.HttpResponseStatus responseStatus
-
-
Constructor Details
-
JaxRsResult
-
-
Method Details
-
getResponseStatus
public io.netty.handler.codec.http.HttpResponseStatus getResponseStatus() -
addHeader
-
doOnOutput
-
map
public JaxRsResult<T> map(rx.functions.Func1<reactor.core.publisher.Flux<T>, reactor.core.publisher.Flux<T>> mapFunction) -
write
public org.reactivestreams.Publisher<Void> write(reactor.netty.http.server.HttpServerResponse response) Write the response.- Parameters:
response- the response- Returns:
- empty publisher
-