Class LocalOptimizationUtil.BusinessObjectCollectionJsonOutputStream

  • All Implemented Interfaces:
    Closeable, Flushable, AutoCloseable
    Enclosing class:
    LocalOptimizationUtil

    public class LocalOptimizationUtil.BusinessObjectCollectionJsonOutputStream
    extends com.gc.iotools.stream.os.OutputStreamToInputStream<List<TransferObject>>
    Converts an OutputStream into an InputStream via an underlying Pipes implementation to prevent loading the entire object into memory for a ValueServiceResponse -> ValueServiceResponse transformation. See EasyStream documentation for more (somewhat confusing) information (but better than doing it all by hand). Bottom line - this takes an InputStream of JSON representing a specific ValueServiceResponse with BusinessObject(s) and streams that into a specific ValueServiceResponse with TransferObject(s). Super obvious, right?
    • Constructor Detail

      • BusinessObjectCollectionJsonOutputStream

        public BusinessObjectCollectionJsonOutputStream​(com.fasterxml.jackson.databind.ObjectMapper objectMapper,
                                                        Class<?> transferObjectClass)
        New instance.
        Parameters:
        objectMapper - ObjectMapper to perform the transformation
        transferObjectClass - the specific TransferObject class being transformed