Package org.nuxeo.ecm.core.event.pipe
Interface PipeConsumer<T>
-
- All Known Implementing Classes:
AbstractListenerPipeConsumer
,AbstractPipeConsumer
,LocalEventBundlePipeConsumer
public interface PipeConsumer<T>
SPI for a consumer of messages inside theEventBundlePipe
- Since:
- 8.4
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
initConsumer(String name, Map<String,String> params)
Initialize the Consumer when theEventBundlePipe
is initializedboolean
receiveMessage(List<T> messages)
Callback when a batch of messages is availablevoid
shutdown()
Shutdown the consumer when theEventBundlePipe
is shutdownboolean
waitForCompletion(long timeoutMillis)
Wait until consumer is done
-
-
-
Method Detail
-
initConsumer
void initConsumer(String name, Map<String,String> params)
Initialize the Consumer when theEventBundlePipe
is initialized
-
receiveMessage
boolean receiveMessage(List<T> messages)
Callback when a batch of messages is available
-
shutdown
void shutdown() throws InterruptedException
Shutdown the consumer when theEventBundlePipe
is shutdown- Throws:
InterruptedException
-
waitForCompletion
boolean waitForCompletion(long timeoutMillis) throws InterruptedException
Wait until consumer is done- Throws:
InterruptedException
-
-