Class TimelineDomainsWriter

java.lang.Object
org.apache.hadoop.yarn.api.records.timeline.writer.TimelineDomainsWriter
All Implemented Interfaces:
javax.ws.rs.ext.MessageBodyWriter<TimelineDomains>

@Provider @Consumes("application/json") public class TimelineDomainsWriter extends Object implements javax.ws.rs.ext.MessageBodyWriter<TimelineDomains>
We have defined a dedicated Writer for TimelineDomains, aimed at adapting to the Jersey2 framework to ensure that TimelineDomains can be converted into JSON format.
  • Constructor Details

    • TimelineDomainsWriter

      public TimelineDomainsWriter()
  • Method Details

    • isWriteable

      public boolean isWriteable(Class<?> type, Type genericType, Annotation[] annotations, javax.ws.rs.core.MediaType mediaType)
      Specified by:
      isWriteable in interface javax.ws.rs.ext.MessageBodyWriter<TimelineDomains>
    • writeTo

      public void writeTo(TimelineDomains timelineDomains, Class<?> type, Type genericType, Annotation[] annotations, javax.ws.rs.core.MediaType mediaType, javax.ws.rs.core.MultivaluedMap<String,Object> httpHeaders, OutputStream entityStream) throws IOException, javax.ws.rs.WebApplicationException
      Specified by:
      writeTo in interface javax.ws.rs.ext.MessageBodyWriter<TimelineDomains>
      Throws:
      IOException
      javax.ws.rs.WebApplicationException
    • getSize

      public long getSize(TimelineDomains timelineDomains, Class<?> type, Type genericType, Annotation[] annotations, javax.ws.rs.core.MediaType mediaType)
      Specified by:
      getSize in interface javax.ws.rs.ext.MessageBodyWriter<TimelineDomains>