Class DataFormatProvider<T>

java.lang.Object
org.apache.camel.component.cxf.jaxrs.DataFormatProvider<T>
All Implemented Interfaces:
jakarta.ws.rs.ext.MessageBodyReader<T>, jakarta.ws.rs.ext.MessageBodyWriter<T>

public class DataFormatProvider<T> extends Object implements jakarta.ws.rs.ext.MessageBodyWriter<T>, jakarta.ws.rs.ext.MessageBodyReader<T>
  • Constructor Details

    • DataFormatProvider

      public DataFormatProvider()
  • Method Details

    • isReadable

      public boolean isReadable(Class<?> cls, Type type, Annotation[] anns, jakarta.ws.rs.core.MediaType mt)
      Specified by:
      isReadable in interface jakarta.ws.rs.ext.MessageBodyReader<T>
    • isWriteable

      public boolean isWriteable(Class<?> cls, Type type, Annotation[] anns, jakarta.ws.rs.core.MediaType mt)
      Specified by:
      isWriteable in interface jakarta.ws.rs.ext.MessageBodyWriter<T>
    • readFrom

      public T readFrom(Class<T> cls, Type type, Annotation[] anns, jakarta.ws.rs.core.MediaType mt, jakarta.ws.rs.core.MultivaluedMap<String,String> headers, InputStream is) throws IOException, jakarta.ws.rs.WebApplicationException
      Specified by:
      readFrom in interface jakarta.ws.rs.ext.MessageBodyReader<T>
      Throws:
      IOException
      jakarta.ws.rs.WebApplicationException
    • getSize

      public long getSize(T obj, Class<?> cls, Type type, Annotation[] anns, jakarta.ws.rs.core.MediaType mt)
      Specified by:
      getSize in interface jakarta.ws.rs.ext.MessageBodyWriter<T>
    • writeTo

      public void writeTo(T obj, Class<?> cls, Type type, Annotation[] anns, jakarta.ws.rs.core.MediaType mt, jakarta.ws.rs.core.MultivaluedMap<String,Object> headers, OutputStream os) throws IOException, jakarta.ws.rs.WebApplicationException
      Specified by:
      writeTo in interface jakarta.ws.rs.ext.MessageBodyWriter<T>
      Throws:
      IOException
      jakarta.ws.rs.WebApplicationException
    • setFormat

      public void setFormat(org.apache.camel.spi.DataFormat format)
    • setFormat

      public void setFormat(String mediaType, org.apache.camel.spi.DataFormat format)
    • setFormats

      public void setFormats(Map<String,org.apache.camel.spi.DataFormat> formats)