Class JacksonJsonResponse<T>


  • public class JacksonJsonResponse<T>
    extends HttpResponse
    A JSON response using Jackson for serialization.
    Author:
    bjorncs
    • Constructor Detail

      • JacksonJsonResponse

        public JacksonJsonResponse​(int statusCode,
                                   T entity)
      • JacksonJsonResponse

        public JacksonJsonResponse​(int statusCode,
                                   T entity,
                                   com.fasterxml.jackson.databind.ObjectMapper jsonMapper)
    • Method Detail

      • render

        public void render​(java.io.OutputStream outputStream)
                    throws java.io.IOException
        Description copied from class: HttpResponse
        Marshal this response to the network layer. The caller is responsible for flushing and closing outputStream.
        Specified by:
        render in class HttpResponse
        Throws:
        java.io.IOException
      • getEntity

        public T getEntity()