BatchListener<QueryBatch>,
QueryBatchListenerAn extension of ExportListener which facilitates writing all documents to a single Writer output stream. The Writer could be a FileWriter, for example, to write output to a CSV file. The Writer could pipe to a socket, for example, to send the output directly to another server endpoint.
By default only document contents are retrieved. If you would
also like metadata, make sure to call
withMetadataCategory to configure which categories
of metadata you desire.
As with all the provided listeners, this listener will not meet the needs of all applications but the source code for it should serve as helpful sample code so you can write your own custom listeners.
static
interface voidinitializeListener (QueryBatcher queryBatcher)voidprocessEvent (QueryBatch batch)withMetadataCategory (DocumentManager.Metadata category)withNonDocumentFormat (Format nonDocumentFormat)withRecordPrefix (String prefix)withRecordSuffix (String suffix)withTransform (ServerTransform transform)getBatchFailureListeners,
getDocs,
onDocumentPageReady, onDocumentReady,
onFailure, withConsistentSnapshot
initializeListener in interface QueryBatchListener
initializeListener in class ExportListenerqueryBatcher - the QueryBatcher which will call
this ListenerExportListenerprocessEvent in
interface BatchListener<QueryBatch>
processEvent in interface QueryBatchListener
processEvent in class ExportListenerbatch - the batch of uris and some metadata about
the current status of the jobsuffix - the string suffixprefix - the string prefixlistener - the custom listener (or lambda
expression)ExportListener
withTransform in class ExportListenertransform - the name of the transform already
installed in the REST serverDocumentRecord.getMetadata
in each DocumentRecord sent to the OutputListener registered with
onGenerateOutput. To specify the format for the metdata, call
withNonDocumentFormat.
withMetadataCategory in class ExportListenercategory - the metadata category to retrieve
withNonDocumentFormat in class ExportListenernonDocumentFormat - the format for the
metadataCopyright (c) 2010-2025 Progress Software Corporation and/or its subsidiaries or affiliates. All Rights Reserved.