Class XmlKeysWriter

java.lang.Object
com.tangosol.coherence.rest.providers.XmlKeysWriter
All Implemented Interfaces:
javax.ws.rs.ext.MessageBodyWriter<Set>

@Provider @Produces("application/xml") public class XmlKeysWriter extends Object implements javax.ws.rs.ext.MessageBodyWriter<Set>
Provider responsible for converting set of keys to a XML formatted stream.
Author:
si 2016.05.17
  • Field Details

    • m_marshallerRegistry

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

    • XmlKeysWriter

      public XmlKeysWriter()
      Default constructor.
    • XmlKeysWriter

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

    • isWriteable

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

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

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