Package org.apache.cxf.jaxrs.provider
Class DataSourceProvider<T>
- java.lang.Object
-
- org.apache.cxf.jaxrs.provider.DataSourceProvider<T>
-
- All Implemented Interfaces:
javax.ws.rs.ext.MessageBodyReader<T>,javax.ws.rs.ext.MessageBodyWriter<T>
@Provider public class DataSourceProvider<T> extends Object implements javax.ws.rs.ext.MessageBodyReader<T>, javax.ws.rs.ext.MessageBodyWriter<T>
-
-
Constructor Summary
Constructors Constructor Description DataSourceProvider()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description longgetSize(T t, Class<?> type, Type genericType, Annotation[] annotations, javax.ws.rs.core.MediaType mt)booleanisReadable(Class<?> type, Type genericType, Annotation[] annotations, javax.ws.rs.core.MediaType mt)booleanisWriteable(Class<?> type, Type genericType, Annotation[] annotations, javax.ws.rs.core.MediaType mt)TreadFrom(Class<T> cls, Type genericType, Annotation[] annotations, javax.ws.rs.core.MediaType type, javax.ws.rs.core.MultivaluedMap<String,String> headers, InputStream is)voidsetUseDataSourceContentType(boolean useDataSourceContentType)voidwriteTo(T src, Class<?> cls, Type genericType, Annotation[] annotations, javax.ws.rs.core.MediaType type, javax.ws.rs.core.MultivaluedMap<String,Object> headers, OutputStream os)
-
-
-
Field Detail
-
LOG
protected static final Logger LOG
-
-
Method Detail
-
isReadable
public boolean isReadable(Class<?> type, Type genericType, Annotation[] annotations, javax.ws.rs.core.MediaType mt)
- Specified by:
isReadablein interfacejavax.ws.rs.ext.MessageBodyReader<T>
-
readFrom
public T readFrom(Class<T> cls, Type genericType, Annotation[] annotations, javax.ws.rs.core.MediaType type, javax.ws.rs.core.MultivaluedMap<String,String> headers, InputStream is) throws IOException
- Specified by:
readFromin interfacejavax.ws.rs.ext.MessageBodyReader<T>- Throws:
IOException
-
getSize
public long getSize(T t, Class<?> type, Type genericType, Annotation[] annotations, javax.ws.rs.core.MediaType mt)
- Specified by:
getSizein interfacejavax.ws.rs.ext.MessageBodyWriter<T>
-
isWriteable
public boolean isWriteable(Class<?> type, Type genericType, Annotation[] annotations, javax.ws.rs.core.MediaType mt)
- Specified by:
isWriteablein interfacejavax.ws.rs.ext.MessageBodyWriter<T>
-
writeTo
public void writeTo(T src, Class<?> cls, Type genericType, Annotation[] annotations, javax.ws.rs.core.MediaType type, javax.ws.rs.core.MultivaluedMap<String,Object> headers, OutputStream os) throws IOException
- Specified by:
writeToin interfacejavax.ws.rs.ext.MessageBodyWriter<T>- Throws:
IOException
-
setUseDataSourceContentType
public void setUseDataSourceContentType(boolean useDataSourceContentType)
-
-