Class ClientJacksonMessageBodyWriter

  • All Implemented Interfaces:
    jakarta.ws.rs.ext.MessageBodyWriter<Object>, org.jboss.resteasy.reactive.client.spi.ClientRestHandler, org.jboss.resteasy.reactive.spi.RestHandler<org.jboss.resteasy.reactive.client.impl.RestClientRequestContext>

    public class ClientJacksonMessageBodyWriter
    extends Object
    implements jakarta.ws.rs.ext.MessageBodyWriter<Object>, org.jboss.resteasy.reactive.client.spi.ClientRestHandler
    • 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,
                                   jakarta.ws.rs.core.MediaType mediaType)
        Specified by:
        isWriteable in interface jakarta.ws.rs.ext.MessageBodyWriter<Object>
      • writeTo

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

        public void handle​(org.jboss.resteasy.reactive.client.impl.RestClientRequestContext requestContext)
                    throws Exception
        Specified by:
        handle in interface org.jboss.resteasy.reactive.spi.RestHandler<org.jboss.resteasy.reactive.client.impl.RestClientRequestContext>
        Throws:
        Exception
      • getEffectiveWriter

        protected com.fasterxml.jackson.databind.ObjectWriter getEffectiveWriter​(jakarta.ws.rs.core.MediaType responseMediaType)