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 Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionlonggetSize(T obj, Class<?> cls, Type type, Annotation[] anns, jakarta.ws.rs.core.MediaType mt) booleanisReadable(Class<?> cls, Type type, Annotation[] anns, jakarta.ws.rs.core.MediaType mt) booleanisWriteable(Class<?> cls, Type type, Annotation[] anns, jakarta.ws.rs.core.MediaType mt) readFrom(Class<T> cls, Type type, Annotation[] anns, jakarta.ws.rs.core.MediaType mt, jakarta.ws.rs.core.MultivaluedMap<String, String> headers, InputStream is) voidvoidsetFormat(org.apache.camel.spi.DataFormat format) voidsetFormats(Map<String, org.apache.camel.spi.DataFormat> formats) voidwriteTo(T obj, Class<?> cls, Type type, Annotation[] anns, jakarta.ws.rs.core.MediaType mt, jakarta.ws.rs.core.MultivaluedMap<String, Object> headers, OutputStream os)
-
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:
isReadablein interfacejakarta.ws.rs.ext.MessageBodyReader<T>
-
isWriteable
public boolean isWriteable(Class<?> cls, Type type, Annotation[] anns, jakarta.ws.rs.core.MediaType mt) - Specified by:
isWriteablein interfacejakarta.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:
readFromin interfacejakarta.ws.rs.ext.MessageBodyReader<T>- Throws:
IOExceptionjakarta.ws.rs.WebApplicationException
-
getSize
public long getSize(T obj, Class<?> cls, Type type, Annotation[] anns, jakarta.ws.rs.core.MediaType mt) - Specified by:
getSizein interfacejakarta.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:
writeToin interfacejakarta.ws.rs.ext.MessageBodyWriter<T>- Throws:
IOExceptionjakarta.ws.rs.WebApplicationException
-
setFormat
public void setFormat(org.apache.camel.spi.DataFormat format) -
setFormat
-
setFormats
-