TimelineEntityWriter (Apache Hadoop YARN API 3.5.0 API)
Description: declaration: package: org.apache.hadoop.yarn.api.records.timelineservice.writer, class: TimelineEntityWriter

Package org.apache.hadoop.yarn.api.records.timelineservice.writer

# Class TimelineEntityWriter

java.lang.Object
org.apache.hadoop.yarn.api.records.timelineservice.writer.TimelineEntityWriter

All Implemented Interfaces:
  `javax.ws.rs.ext.MessageBodyWriter<TimelineEntity>`

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

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `TimelineEntityWriter()`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `long`
  `getSize(TimelineEntity timelineEntity, Class<?> type, Type genericType, Annotation[] annotations, javax.ws.rs.core.MediaType mediaType)`
  `boolean`
  `isWriteable(Class<?> type, Type genericType, Annotation[] annotations, javax.ws.rs.core.MediaType mediaType)`
  `void`
  `writeTo(TimelineEntity timelineEntity, Class<?> type, Type genericType, Annotation[] annotations, javax.ws.rs.core.MediaType mediaType, javax.ws.rs.core.MultivaluedMap<String,Object> httpHeaders, OutputStream entityStream)`

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Constructor Details

  - ### TimelineEntityWriter

    public TimelineEntityWriter()

- ## 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<TimelineEntity>`

  - ### writeTo

    public void writeTo(TimelineEntity timelineEntity, 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<TimelineEntity>`
    Throws:
      `IOException`
      `javax.ws.rs.WebApplicationException`

  - ### getSize

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