Class BlobWatermarkMessageConsumer
- java.lang.Object
-
- org.nuxeo.lib.stream.pattern.consumer.AbstractConsumer<BlobMessage>
-
- org.nuxeo.importer.stream.consumer.BlobMessageConsumer
-
- org.nuxeo.importer.stream.consumer.BlobWatermarkMessageConsumer
-
- All Implemented Interfaces:
AutoCloseable
,Consumer<BlobMessage>
public class BlobWatermarkMessageConsumer extends BlobMessageConsumer
Consume blobMessages and generate new blob by adding a unique watermark.- Since:
- 10.1
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.nuxeo.importer.stream.consumer.BlobMessageConsumer
BlobMessageConsumer.CloseableBlob
-
-
Field Summary
Fields Modifier and Type Field Description protected String
generatedBlobPath
protected Watermarker
jpegWatermarker
protected Watermarker
mp4Watermarker
protected Path
outputPath
protected String
prefix
protected Watermarker
textWatermarker
-
Fields inherited from class org.nuxeo.importer.stream.consumer.BlobMessageConsumer
blobInfoWriter, blobProvider, blobProviderName
-
Fields inherited from class org.nuxeo.lib.stream.pattern.consumer.AbstractConsumer
consumerId
-
-
Constructor Summary
Constructors Constructor Description BlobWatermarkMessageConsumer(String consumerId, String blobProviderName, BlobInfoWriter blobInfoWriter, String watermarkPrefix, String persistBlobPath)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected BlobMessageConsumer.CloseableBlob
addWatermark(BlobMessage message, String watermark, Watermarker watermarker)
protected BlobMessageConsumer.CloseableBlob
getBlob(BlobMessage message)
protected String
getWatermarkString()
-
Methods inherited from class org.nuxeo.importer.stream.consumer.BlobMessageConsumer
accept, begin, commit, rollback, saveBlobInfo
-
Methods inherited from class org.nuxeo.lib.stream.pattern.consumer.AbstractConsumer
close, getConsumerId
-
-
-
-
Field Detail
-
prefix
protected final String prefix
-
generatedBlobPath
protected final String generatedBlobPath
-
outputPath
protected final Path outputPath
-
textWatermarker
protected final Watermarker textWatermarker
-
jpegWatermarker
protected final Watermarker jpegWatermarker
-
mp4Watermarker
protected final Watermarker mp4Watermarker
-
-
Constructor Detail
-
BlobWatermarkMessageConsumer
public BlobWatermarkMessageConsumer(String consumerId, String blobProviderName, BlobInfoWriter blobInfoWriter, String watermarkPrefix, String persistBlobPath)
- Parameters:
persistBlobPath
- when it is blank we don't delete generated blobs
-
-
Method Detail
-
getBlob
protected BlobMessageConsumer.CloseableBlob getBlob(BlobMessage message)
- Overrides:
getBlob
in classBlobMessageConsumer
-
addWatermark
protected BlobMessageConsumer.CloseableBlob addWatermark(BlobMessage message, String watermark, Watermarker watermarker)
-
getWatermarkString
protected String getWatermarkString()
-
-