Class ReactorNettyHttpResponse
- java.lang.Object
 - 
- org.jboss.resteasy.plugins.server.reactor.netty.ReactorNettyHttpResponse
 
 
- 
- All Implemented Interfaces:
 Closeable,AutoCloseable,HttpResponse
public class ReactorNettyHttpResponse extends Object implements HttpResponse
This is the 1-way bridge from RestEasy to reactor-netty'sHttpServerResponse. Headers come via direct call. RestEasy will write the response body to the output stream it gets fromgetOutputStream(). 
- 
- 
Constructor Summary
Constructors Constructor Description ReactorNettyHttpResponse(io.netty.handler.codec.http.HttpMethod method, reactor.netty.http.server.HttpServerResponse resp, reactor.core.publisher.Sinks.Empty<Void> completionSink) 
- 
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddNewCookie(javax.ws.rs.core.NewCookie cookie)voidclose()voidflushBuffer()javax.ws.rs.core.MultivaluedMap<String,Object>getOutputHeaders()OutputStreamgetOutputStream()intgetStatus()booleanisCommitted()voidreset()reset status and headers.voidsendError(int status)voidsendError(int status, String message)voidsetOutputStream(OutputStream os)voidsetStatus(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 Detail
- 
ReactorNettyHttpResponse
public ReactorNettyHttpResponse(io.netty.handler.codec.http.HttpMethod method, reactor.netty.http.server.HttpServerResponse resp, reactor.core.publisher.Sinks.Empty<Void> completionSink) 
 - 
 
- 
Method Detail
- 
getStatus
public int getStatus()
- Specified by:
 getStatusin interfaceHttpResponse
 
- 
setStatus
public void setStatus(int status)
- Specified by:
 setStatusin interfaceHttpResponse
 
- 
getOutputHeaders
public javax.ws.rs.core.MultivaluedMap<String,Object> getOutputHeaders()
- Specified by:
 getOutputHeadersin interfaceHttpResponse
 
- 
getOutputStream
public OutputStream getOutputStream()
- Specified by:
 getOutputStreamin interfaceHttpResponse
 
- 
setOutputStream
public void setOutputStream(OutputStream os)
- Specified by:
 setOutputStreamin interfaceHttpResponse
 
- 
addNewCookie
public void addNewCookie(javax.ws.rs.core.NewCookie cookie)
- Specified by:
 addNewCookiein interfaceHttpResponse
 
- 
sendError
public void sendError(int status)
- Specified by:
 sendErrorin interfaceHttpResponse
 
- 
sendError
public void sendError(int status, String message)- Specified by:
 sendErrorin interfaceHttpResponse
 
- 
isCommitted
public boolean isCommitted()
- Specified by:
 isCommittedin interfaceHttpResponse
 
- 
reset
public void reset()
Description copied from interface:HttpResponsereset status and headers. Will fail if response is committed- Specified by:
 resetin interfaceHttpResponse
 
- 
close
public void close() throws IOException- Specified by:
 closein interfaceAutoCloseable- Specified by:
 closein interfaceCloseable- Specified by:
 closein interfaceHttpResponse- Throws:
 IOException
 
- 
flushBuffer
public void flushBuffer() throws IOException- Specified by:
 flushBufferin interfaceHttpResponse- Throws:
 IOException
 
 - 
 
 -