public abstract class JsonAndJsonApiResponseWriter extends Object implements ResponseWriter
Constructor and Description |
---|
JsonAndJsonApiResponseWriter(ObjectMappersSuite objectMappers)
Constructor for both Json and JsonApi format serializer.
|
Modifier and Type | Method and Description |
---|---|
protected ObjectMappersSuite |
getObjectMappers() |
void |
writeMetaObject(com.fasterxml.jackson.core.JsonGenerator generator,
Collection<org.joda.time.Interval> missingIntervals,
SimplifiedIntervalList volatileIntervals,
ResponseData responseData)
Builds the meta object for the JSON response.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
write
public JsonAndJsonApiResponseWriter(ObjectMappersSuite objectMappers)
objectMappers
- ObjectMappersSuite object needed for JsonFactoryprotected ObjectMappersSuite getObjectMappers()
public void writeMetaObject(com.fasterxml.jackson.core.JsonGenerator generator, Collection<org.joda.time.Interval> missingIntervals, SimplifiedIntervalList volatileIntervals, ResponseData responseData) throws IOException
generator
- The JsonGenerator used to build the JSON response.missingIntervals
- The set of intervals that do not contain data.volatileIntervals
- The set of intervals that have volatile data.responseData
- The ResponseData object containing pagination and paginationLinks.IOException
- if the generator throws an IOException.Copyright © 2016–2018 Yahoo! Inc.. All rights reserved.