Class DataSourceProvider<T>

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

@Provider public class DataSourceProvider<T> extends Object implements jakarta.ws.rs.ext.MessageBodyReader<T>, jakarta.ws.rs.ext.MessageBodyWriter<T>
  • Field Details

    • LOG

      protected static final Logger LOG
  • Constructor Details

    • DataSourceProvider

      public DataSourceProvider()
  • Method Details

    • isReadable

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

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

      public long getSize(T t, Class<?> type, Type genericType, Annotation[] annotations, jakarta.ws.rs.core.MediaType mt)
      Specified by:
      getSize in interface jakarta.ws.rs.ext.MessageBodyWriter<T>
    • isWriteable

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

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

      public void setUseDataSourceContentType(boolean useDataSourceContentType)