public class StreamOutRPWFSConsumer extends AbstractFSConsumer
JsonStreamingSerializer
to write out a
single metadata object at a time.ELAPSED_MILLIS, IO_IS, IO_OS, LOG, OOM, PARSE_ERR, PARSE_EX, TIMED_OUT
Constructor and Description |
---|
StreamOutRPWFSConsumer(ArrayBlockingQueue<FileResource> queue,
Parser parser,
ContentHandlerFactory contentHandlerFactory,
OutputStreamFactory fsOSFactory,
MetadataFilter metadataFilter) |
Modifier and Type | Method and Description |
---|---|
String |
getOutputEncoding() |
boolean |
processFileResource(FileResource fileResource)
Main piece of code that needs to be implemented.
|
void |
setOutputEncoding(String outputEncoding) |
getInputStream, getOutputStream
call, checkForTimedOutMillis, close, flushAndClose, getCurrentFile, getNumHandledExceptions, getNumResourcesConsumed, getXMLifiedLogMsg, getXMLifiedLogMsg, incrementHandledExceptions, isStillActive, parse, pleaseShutdown
public StreamOutRPWFSConsumer(ArrayBlockingQueue<FileResource> queue, Parser parser, ContentHandlerFactory contentHandlerFactory, OutputStreamFactory fsOSFactory, MetadataFilter metadataFilter)
public boolean processFileResource(FileResource fileResource)
FileResourceConsumer
Unchecked throwables can be thrown past this, of course. When an unchecked throwable is thrown, this logs the error, and then rethrows the exception. Clients/subclasses should make sure to catch and handle everything they can.
The design goal is that the whole process should close up and shutdown soon after an unchecked exception or error is thrown.
Make sure to call FileResourceConsumer.incrementHandledExceptions()
appropriately in
your implementation of this method.
processFileResource
in class FileResourceConsumer
fileResource
- resource to processpublic String getOutputEncoding()
public void setOutputEncoding(String outputEncoding)
Copyright © 2007–2022 The Apache Software Foundation. All rights reserved.