Package org.jboss.resteasy.plugins.server.reactor.netty

## 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's `HttpServerResponse`. Headers come via direct call. RestEasy will write the response body to the output stream it gets from `getOutputStream()`.

- - ### 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
    --- | --- | ---
    `void` | `addNewCookie​(javax.ws.rs.core.NewCookie cookie)` |
    `void` | `close()` |
    `void` | `flushBuffer()` |
    `javax.ws.rs.core.MultivaluedMap<String,​Object>` | `getOutputHeaders()` |
    `OutputStream` | `getOutputStream()` |
    `int` | `getStatus()` |
    `boolean` | `isCommitted()` |
    `void` | `reset()` | reset status and headers.
    `void` | `sendError​(int status)` |
    `void` | `sendError​(int status, String message)` |
    `void` | `setOutputStream​(OutputStream os)` |
    `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 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:
        `getStatus` in interface `HttpResponse`

    - #### setStatus

          public void setStatus​(int status)

      Specified by:
        `setStatus` in interface `HttpResponse`

    - #### getOutputHeaders

          public javax.ws.rs.core.MultivaluedMap<String,​Object> getOutputHeaders()

      Specified by:
        `getOutputHeaders` in interface `HttpResponse`

    - #### getOutputStream

          public OutputStream getOutputStream()

      Specified by:
        `getOutputStream` in interface `HttpResponse`

    - #### setOutputStream

          public void setOutputStream​(OutputStream os)

      Specified by:
        `setOutputStream` in interface `HttpResponse`

    - #### addNewCookie

          public void addNewCookie​(javax.ws.rs.core.NewCookie cookie)

      Specified by:
        `addNewCookie` in interface `HttpResponse`

    - #### sendError

          public void sendError​(int status)

      Specified by:
        `sendError` in interface `HttpResponse`

    - #### sendError

          public void sendError​(int status,
                                String message)

      Specified by:
        `sendError` in interface `HttpResponse`

    - #### isCommitted

          public boolean isCommitted()

      Specified by:
        `isCommitted` in interface `HttpResponse`

    - #### reset

          public void reset()

      Description copied from interface: `HttpResponse`
      reset status and headers. Will fail if response is committed
      Specified by:
        `reset` in interface `HttpResponse`

    - #### close

          public void close()
                     throws IOException

      Specified by:
        `close` in interface `AutoCloseable`
      Specified by:
        `close` in interface `Closeable`
      Specified by:
        `close` in interface `HttpResponse`
      Throws:
        `IOException`

    - #### flushBuffer

          public void flushBuffer()
                           throws IOException

      Specified by:
        `flushBuffer` in interface `HttpResponse`
      Throws:
        `IOException`