public class DocumentMessageConsumer extends AbstractConsumer<DocumentMessage>
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.
|
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
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
public void rollback()
Consumer
Consumer.accept(Message)
or Consumer.commit()
.protected void setDocumentProperties(DocumentModel doc, Map<String,Serializable> properties)
Copyright © 2017 Nuxeo. All rights reserved.