Package jadex.extension.rs.publish
Class JadexXMLBodyWriter
- java.lang.Object
-
- jadex.extension.rs.publish.JadexXMLBodyWriter
-
- All Implemented Interfaces:
javax.ws.rs.ext.MessageBodyWriter<java.lang.Object>
@Provider public class JadexXMLBodyWriter extends java.lang.Object implements javax.ws.rs.ext.MessageBodyWriter<java.lang.Object>
Body writer for Jersey. Allows to use the Jadex XML Codec for producing XML for parameters.
-
-
Constructor Summary
Constructors Constructor Description JadexXMLBodyWriter()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description long
getSize(java.lang.Object t, java.lang.Class<?> type, java.lang.reflect.Type genericType, java.lang.annotation.Annotation[] annotations, javax.ws.rs.core.MediaType mediaType)
Get the size of the result.boolean
isWriteable(java.lang.Class<?> type, java.lang.reflect.Type gtype, java.lang.annotation.Annotation[] annotations, javax.ws.rs.core.MediaType mediatype)
Test if the writer can handle the content.void
writeTo(java.lang.Object t, java.lang.Class<?> type, java.lang.reflect.Type generictype, java.lang.annotation.Annotation[] annotations, javax.ws.rs.core.MediaType mediatype, javax.ws.rs.core.MultivaluedMap<java.lang.String,java.lang.Object> httpheaders, java.io.OutputStream entityStream)
Write the object to the output stream.
-
-
-
Method Detail
-
isWriteable
public boolean isWriteable(java.lang.Class<?> type, java.lang.reflect.Type gtype, java.lang.annotation.Annotation[] annotations, javax.ws.rs.core.MediaType mediatype)
Test if the writer can handle the content.- Specified by:
isWriteable
in interfacejavax.ws.rs.ext.MessageBodyWriter<java.lang.Object>
-
writeTo
public void writeTo(java.lang.Object t, java.lang.Class<?> type, java.lang.reflect.Type generictype, java.lang.annotation.Annotation[] annotations, javax.ws.rs.core.MediaType mediatype, javax.ws.rs.core.MultivaluedMap<java.lang.String,java.lang.Object> httpheaders, java.io.OutputStream entityStream) throws java.io.IOException, javax.ws.rs.WebApplicationException
Write the object to the output stream.- Specified by:
writeTo
in interfacejavax.ws.rs.ext.MessageBodyWriter<java.lang.Object>
- Throws:
java.io.IOException
javax.ws.rs.WebApplicationException
-
getSize
public long getSize(java.lang.Object t, java.lang.Class<?> type, java.lang.reflect.Type genericType, java.lang.annotation.Annotation[] annotations, javax.ws.rs.core.MediaType mediaType)
Get the size of the result.- Specified by:
getSize
in interfacejavax.ws.rs.ext.MessageBodyWriter<java.lang.Object>
-
-