Class 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.
    • 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.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • JadexXMLBodyWriter

        public JadexXMLBodyWriter()
    • 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 interface javax.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 interface javax.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 interface javax.ws.rs.ext.MessageBodyWriter<java.lang.Object>