Package org.nuxeo.ecm.core.event.pipe
Class AbstractPipeConsumer<T>
- java.lang.Object
-
- org.nuxeo.ecm.core.event.pipe.AbstractPipeConsumer<T>
-
- All Implemented Interfaces:
PipeConsumer<T>
- Direct Known Subclasses:
AbstractListenerPipeConsumer
public abstract class AbstractPipeConsumer<T> extends Object implements PipeConsumer<T>
Provides partial default implementation for aPipeConsumer- Since:
- 8.4
-
-
Constructor Summary
Constructors Constructor Description AbstractPipeConsumer()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected StringgetName()protected Map<String,String>getParameters()voidinitConsumer(String name, Map<String,String> params)Initialize the Consumer when theEventBundlePipeis initializedprotected abstract booleanprocessEventBundles(List<EventBundle> bundles)booleanreceiveMessage(List<T> messages)Callback when a batch of messages is availableprotected abstract List<EventBundle>unmarshallEventBundle(List<T> messages)-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.nuxeo.ecm.core.event.pipe.PipeConsumer
shutdown, waitForCompletion
-
-
-
-
Method Detail
-
initConsumer
public void initConsumer(String name, Map<String,String> params)
Description copied from interface:PipeConsumerInitialize the Consumer when theEventBundlePipeis initialized- Specified by:
initConsumerin interfacePipeConsumer<T>
-
getName
protected String getName()
-
receiveMessage
public boolean receiveMessage(List<T> messages)
Description copied from interface:PipeConsumerCallback when a batch of messages is available- Specified by:
receiveMessagein interfacePipeConsumer<T>
-
unmarshallEventBundle
protected abstract List<EventBundle> unmarshallEventBundle(List<T> messages)
-
processEventBundles
protected abstract boolean processEventBundles(List<EventBundle> bundles)
-
-