Class BlobMessageConsumer
java.lang.Object
org.nuxeo.lib.stream.pattern.consumer.AbstractConsumer<BlobMessage>
org.nuxeo.importer.stream.consumer.BlobMessageConsumer
- All Implemented Interfaces:
AutoCloseable
,Consumer<BlobMessage>
- Direct Known Subclasses:
BlobWatermarkMessageConsumer
Import BlobMessage into a Nuxeo BlobProvider, persist BlobInformation.
- Since:
- 9.1
-
Nested Class Summary
-
Field Summary
Modifier and TypeFieldDescriptionprotected final BlobInfoWriter
protected BlobProvider
protected final String
Fields inherited from class org.nuxeo.lib.stream.pattern.consumer.AbstractConsumer
consumerId
-
Constructor Summary
ConstructorDescriptionBlobMessageConsumer
(String consumerId, String blobProviderName, BlobInfoWriter blobInfoWriter) -
Method Summary
Modifier and TypeMethodDescriptionvoid
accept
(BlobMessage message) Consume a message.void
begin()
Begin a batch of messages.void
commit()
End of the batch message.protected BlobMessageConsumer.CloseableBlob
getBlob
(BlobMessage message) void
rollback()
Called when there is an exception duringConsumer.accept(Message)
orConsumer.commit()
.protected void
saveBlobInfo
(BlobMessage message, String digest, long length, File blobFile) Methods inherited from class org.nuxeo.lib.stream.pattern.consumer.AbstractConsumer
close, getConsumerId
-
Field Details
-
blobProvider
-
blobProviderName
-
blobInfoWriter
-
-
Constructor Details
-
BlobMessageConsumer
public BlobMessageConsumer(String consumerId, String blobProviderName, BlobInfoWriter blobInfoWriter)
-
-
Method Details
-
begin
public void begin()Description copied from interface:Consumer
Begin a batch of messages. -
accept
Description copied from interface:Consumer
Consume a message. -
getBlob
-
saveBlobInfo
-
commit
public void commit()Description copied from interface:Consumer
End of the batch message. -
rollback
public void rollback()Description copied from interface:Consumer
Called when there is an exception duringConsumer.accept(Message)
orConsumer.commit()
.
-