public class DocumentMessageConsumer extends AbstractConsumer<DocumentMessage>
Modifier and Type | Field and Description |
---|---|
protected String |
repositoryName |
protected String |
rootPath |
protected CoreSession |
session |
consumerId
Constructor and Description |
---|
DocumentMessageConsumer(String consumerId,
String repositoryName,
String rootPath) |
Modifier and Type | Method and Description |
---|---|
void |
accept(DocumentMessage message)
Consume a message.
|
void |
begin()
Begin a batch of messages.
|
void |
close() |
void |
commit()
End of the batch message.
|
protected Blob |
getBlob(DocumentMessage message) |
void |
rollback()
Called when there is an exception during
Consumer.accept(Message) or Consumer.commit() . |
protected void |
setDocumentProperties(DocumentModel doc,
Map<String,Serializable> properties) |
getConsumerId
protected final String repositoryName
protected CoreSession session
public DocumentMessageConsumer(String consumerId, String repositoryName, String rootPath)
public void close() throws Exception
close
in interface AutoCloseable
close
in class AbstractConsumer<DocumentMessage>
Exception
public void accept(DocumentMessage message)
Consumer
protected Blob getBlob(DocumentMessage message)
public void rollback()
Consumer
Consumer.accept(Message)
or Consumer.commit()
.protected void setDocumentProperties(DocumentModel doc, Map<String,Serializable> properties)
Copyright © 2018 Nuxeo. All rights reserved.