Class ObjectMapperFilteredResultsProcessor<R>

java.lang.Object
net.solarnetwork.central.support.AbstractFilteredResultsProcessor<R>
net.solarnetwork.central.support.ObjectMapperFilteredResultsProcessor<R>
All Implemented Interfaces:
Closeable, Flushable, AutoCloseable, FilteredResultsProcessor<R>

public class ObjectMapperFilteredResultsProcessor<R> extends AbstractFilteredResultsProcessor<R>
Basic FilteredResultsProcessor that serializes using Jackson JSON.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final com.fasterxml.jackson.core.io.SerializedString
    The success array field name.
  • Constructor Summary

    Constructors
    Constructor
    Description
    ObjectMapperFilteredResultsProcessor(com.fasterxml.jackson.core.JsonGenerator generator, com.fasterxml.jackson.databind.SerializerProvider provider, org.springframework.util.MimeType mimeType, com.fasterxml.jackson.databind.JsonSerializer<R> serializer)
    Constructor.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
     
    void
     
    org.springframework.util.MimeType
    Get the MIME type generated by this processor.
    void
    Process a result item.
    void
    start(Long totalResultCount, Integer startingOffset, Integer expectedResultCount, Map<String,?> attributes)
    Called at the start of the export process, to initialize any necessary resources or write any header information.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • SUCCESS_FIELD_NAME

      public static final com.fasterxml.jackson.core.io.SerializedString SUCCESS_FIELD_NAME
      The success array field name.
  • Constructor Details

    • ObjectMapperFilteredResultsProcessor

      public ObjectMapperFilteredResultsProcessor(com.fasterxml.jackson.core.JsonGenerator generator, com.fasterxml.jackson.databind.SerializerProvider provider, org.springframework.util.MimeType mimeType, com.fasterxml.jackson.databind.JsonSerializer<R> serializer)
      Constructor.
      Parameters:
      generator - the generator to use
      provider - the provider to use
      the - serializer to use, or null to rely on the JsonGenerator
      Throws:
      IllegalArgumentException - if any argument other than serializer is null
  • Method Details