Class ReactorNettyHttpResponse
java.lang.Object
org.jboss.resteasy.plugins.server.reactor.netty.ReactorNettyHttpResponse
- All Implemented Interfaces:
Closeable
,AutoCloseable
,HttpResponse
This is the 1-way bridge from RestEasy to reactor-netty's
HttpServerResponse
. Headers come via direct call. RestEasy will write the
response body to the output stream it gets from getOutputStream()
.-
Constructor Summary
ConstructorDescriptionReactorNettyHttpResponse
(io.netty.handler.codec.http.HttpMethod method, reactor.netty.http.server.HttpServerResponse resp, reactor.core.publisher.Sinks.Empty<Void> completionSink) -
Method Summary
Modifier and TypeMethodDescriptionvoid
addNewCookie
(jakarta.ws.rs.core.NewCookie cookie) void
close()
void
int
boolean
void
reset()
reset status and headers.void
sendError
(int status) void
void
void
setStatus
(int status) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.jboss.resteasy.spi.HttpResponse
getAsyncOutputStream, setSuppressExceptionDuringChunkedTransfer, suppressExceptionDuringChunkedTransfer
-
Constructor Details
-
ReactorNettyHttpResponse
public ReactorNettyHttpResponse(io.netty.handler.codec.http.HttpMethod method, reactor.netty.http.server.HttpServerResponse resp, reactor.core.publisher.Sinks.Empty<Void> completionSink)
-
-
Method Details
-
getStatus
public int getStatus()- Specified by:
getStatus
in interfaceHttpResponse
-
setStatus
public void setStatus(int status) - Specified by:
setStatus
in interfaceHttpResponse
-
getOutputHeaders
- Specified by:
getOutputHeaders
in interfaceHttpResponse
-
getOutputStream
- Specified by:
getOutputStream
in interfaceHttpResponse
-
setOutputStream
- Specified by:
setOutputStream
in interfaceHttpResponse
-
addNewCookie
public void addNewCookie(jakarta.ws.rs.core.NewCookie cookie) - Specified by:
addNewCookie
in interfaceHttpResponse
-
sendError
public void sendError(int status) - Specified by:
sendError
in interfaceHttpResponse
-
sendError
- Specified by:
sendError
in interfaceHttpResponse
-
isCommitted
public boolean isCommitted()- Specified by:
isCommitted
in interfaceHttpResponse
-
reset
public void reset()Description copied from interface:HttpResponse
reset status and headers. Will fail if response is committed- Specified by:
reset
in interfaceHttpResponse
-
close
- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Specified by:
close
in interfaceHttpResponse
- Throws:
IOException
-
flushBuffer
- Specified by:
flushBuffer
in interfaceHttpResponse
- Throws:
IOException
-