Package org.nuxeo.ecm.core.event.pipe
Class AbstractListenerPipeConsumer<T>
- java.lang.Object
-
- org.nuxeo.ecm.core.event.pipe.AbstractPipeConsumer<T>
-
- org.nuxeo.ecm.core.event.pipe.AbstractListenerPipeConsumer<T>
-
- All Implemented Interfaces:
PipeConsumer<T>
- Direct Known Subclasses:
LocalEventBundlePipeConsumer
public abstract class AbstractListenerPipeConsumer<T> extends AbstractPipeConsumer<T>
ConsumesEventBundle
EventBundles by running asynchronousEventListener
- Since:
- 8.4
-
-
Field Summary
Fields Modifier and Type Field Description protected AsyncEventExecutor
asyncExec
protected boolean
stopping
-
Fields inherited from class org.nuxeo.ecm.core.event.pipe.AbstractPipeConsumer
name, params
-
-
Constructor Summary
Constructors Constructor Description AbstractListenerPipeConsumer()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
initConsumer(String name, Map<String,String> params)
Initialize the Consumer when theEventBundlePipe
is initializedprotected boolean
processEventBundles(List<EventBundle> bundles)
void
shutdown()
Shutdown the consumer when theEventBundlePipe
is shutdownboolean
waitForCompletion(long timeoutMillis)
Wait until consumer is done-
Methods inherited from class org.nuxeo.ecm.core.event.pipe.AbstractPipeConsumer
getName, getParameters, receiveMessage, unmarshallEventBundle
-
-
-
-
Field Detail
-
asyncExec
protected volatile AsyncEventExecutor asyncExec
-
stopping
protected boolean stopping
-
-
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>
- Overrides:
initConsumer
in classAbstractPipeConsumer<T>
-
shutdown
public void shutdown() throws InterruptedException
Description copied from interface:PipeConsumer
Shutdown the consumer when theEventBundlePipe
is shutdown- Throws:
InterruptedException
-
processEventBundles
protected boolean processEventBundles(List<EventBundle> bundles)
- Specified by:
processEventBundles
in classAbstractPipeConsumer<T>
-
waitForCompletion
public boolean waitForCompletion(long timeoutMillis) throws InterruptedException
Description copied from interface:PipeConsumer
Wait until consumer is done- Throws:
InterruptedException
-
-