Class DataFormatProvider<T>
- java.lang.Object
-
- org.apache.camel.component.cxf.jaxrs.DataFormatProvider<T>
-
- All Implemented Interfaces:
javax.ws.rs.ext.MessageBodyReader<T>
,javax.ws.rs.ext.MessageBodyWriter<T>
public class DataFormatProvider<T> extends Object implements javax.ws.rs.ext.MessageBodyWriter<T>, javax.ws.rs.ext.MessageBodyReader<T>
-
-
Constructor Summary
Constructors Constructor Description DataFormatProvider()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description long
getSize(T obj, Class<?> cls, Type type, Annotation[] anns, javax.ws.rs.core.MediaType mt)
boolean
isReadable(Class<?> cls, Type type, Annotation[] anns, javax.ws.rs.core.MediaType mt)
boolean
isWriteable(Class<?> cls, Type type, Annotation[] anns, javax.ws.rs.core.MediaType mt)
T
readFrom(Class<T> cls, Type type, Annotation[] anns, javax.ws.rs.core.MediaType mt, javax.ws.rs.core.MultivaluedMap<String,String> headers, InputStream is)
void
setFormat(String mediaType, org.apache.camel.spi.DataFormat format)
void
setFormat(org.apache.camel.spi.DataFormat format)
void
setFormats(Map<String,org.apache.camel.spi.DataFormat> formats)
void
writeTo(T obj, Class<?> cls, Type type, Annotation[] anns, javax.ws.rs.core.MediaType mt, javax.ws.rs.core.MultivaluedMap<String,Object> headers, OutputStream os)
-
-
-
Method Detail
-
isReadable
public boolean isReadable(Class<?> cls, Type type, Annotation[] anns, javax.ws.rs.core.MediaType mt)
- Specified by:
isReadable
in interfacejavax.ws.rs.ext.MessageBodyReader<T>
-
isWriteable
public boolean isWriteable(Class<?> cls, Type type, Annotation[] anns, javax.ws.rs.core.MediaType mt)
- Specified by:
isWriteable
in interfacejavax.ws.rs.ext.MessageBodyWriter<T>
-
readFrom
public T readFrom(Class<T> cls, Type type, Annotation[] anns, javax.ws.rs.core.MediaType mt, javax.ws.rs.core.MultivaluedMap<String,String> headers, InputStream is) throws IOException, javax.ws.rs.WebApplicationException
- Specified by:
readFrom
in interfacejavax.ws.rs.ext.MessageBodyReader<T>
- Throws:
IOException
javax.ws.rs.WebApplicationException
-
getSize
public long getSize(T obj, Class<?> cls, Type type, Annotation[] anns, javax.ws.rs.core.MediaType mt)
- Specified by:
getSize
in interfacejavax.ws.rs.ext.MessageBodyWriter<T>
-
writeTo
public void writeTo(T obj, Class<?> cls, Type type, Annotation[] anns, javax.ws.rs.core.MediaType mt, javax.ws.rs.core.MultivaluedMap<String,Object> headers, OutputStream os) throws IOException, javax.ws.rs.WebApplicationException
- Specified by:
writeTo
in interfacejavax.ws.rs.ext.MessageBodyWriter<T>
- Throws:
IOException
javax.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)
-
-