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 String
getName()
protected Map<String,String>
getParameters()
void
initConsumer(String name, Map<String,String> params)
Initialize the Consumer when theEventBundlePipe
is initializedprotected abstract boolean
processEventBundles(List<EventBundle> bundles)
boolean
receiveMessage(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:PipeConsumer
Initialize the Consumer when theEventBundlePipe
is initialized- Specified by:
initConsumer
in interfacePipeConsumer<T>
-
getName
protected String getName()
-
receiveMessage
public boolean receiveMessage(List<T> messages)
Description copied from interface:PipeConsumer
Callback when a batch of messages is available- Specified by:
receiveMessage
in interfacePipeConsumer<T>
-
unmarshallEventBundle
protected abstract List<EventBundle> unmarshallEventBundle(List<T> messages)
-
processEventBundles
protected abstract boolean processEventBundles(List<EventBundle> bundles)
-
-