Class ClientJacksonMessageBodyWriter

  • All Implemented Interfaces:
    javax.ws.rs.ext.MessageBodyWriter<Object>

    public class ClientJacksonMessageBodyWriter
    extends Object
    implements javax.ws.rs.ext.MessageBodyWriter<Object>
    • Field Detail

      • originalMapper

        protected final com.fasterxml.jackson.databind.ObjectMapper originalMapper
      • defaultWriter

        protected final com.fasterxml.jackson.databind.ObjectWriter defaultWriter
    • Constructor Detail

      • ClientJacksonMessageBodyWriter

        @Inject
        public ClientJacksonMessageBodyWriter​(com.fasterxml.jackson.databind.ObjectMapper mapper)
    • Method Detail

      • isWriteable

        public boolean isWriteable​(Class type,
                                   Type genericType,
                                   Annotation[] annotations,
                                   javax.ws.rs.core.MediaType mediaType)
        Specified by:
        isWriteable in interface javax.ws.rs.ext.MessageBodyWriter<Object>
      • writeTo

        public void writeTo​(Object o,
                            Class<?> type,
                            Type genericType,
                            Annotation[] annotations,
                            javax.ws.rs.core.MediaType mediaType,
                            javax.ws.rs.core.MultivaluedMap<String,​Object> httpHeaders,
                            OutputStream entityStream)
                     throws IOException,
                            javax.ws.rs.WebApplicationException
        Specified by:
        writeTo in interface javax.ws.rs.ext.MessageBodyWriter<Object>
        Throws:
        IOException
        javax.ws.rs.WebApplicationException