Class XmlCollectionWriter

java.lang.Object
com.tangosol.coherence.rest.providers.XmlCollectionWriter
All Implemented Interfaces:
jakarta.ws.rs.ext.MessageBodyWriter<Object>

@Provider @Produces("application/xml") public class XmlCollectionWriter extends Object implements jakarta.ws.rs.ext.MessageBodyWriter<Object>
Provider responsible for converting Java collections to a XML formatted stream.
Author:
vp 2011.06.29
  • Field Details

    • m_marshallerRegistry

      @Inject protected MarshallerRegistry m_marshallerRegistry
      Marshaller registry to obtain element marshallers from.
  • Constructor Details

    • XmlCollectionWriter

      public XmlCollectionWriter()
      Default constructor.
    • XmlCollectionWriter

      public XmlCollectionWriter(MarshallerRegistry registry)
      Construct an XmlCollectionWriter instance.
      Parameters:
      registry - marshaller registry to use
  • Method Details

    • isWriteable

      public boolean isWriteable(Class<?> clz, Type type, Annotation[] aAnnotation, jakarta.ws.rs.core.MediaType mediaType)
      Specified by:
      isWriteable in interface jakarta.ws.rs.ext.MessageBodyWriter<Object>
    • getSize

      public long getSize(Object col, Class<?> clz, Type type, Annotation[] aAnnotation, jakarta.ws.rs.core.MediaType mediaType)
      Specified by:
      getSize in interface jakarta.ws.rs.ext.MessageBodyWriter<Object>
    • writeTo

      public void writeTo(Object oCol, Class<?> clz, Type type, Annotation[] aAnnotation, jakarta.ws.rs.core.MediaType mediaType, jakarta.ws.rs.core.MultivaluedMap<String,Object> httpHeaders, OutputStream stream) throws IOException, jakarta.ws.rs.WebApplicationException
      Specified by:
      writeTo in interface jakarta.ws.rs.ext.MessageBodyWriter<Object>
      Throws:
      IOException
      jakarta.ws.rs.WebApplicationException