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 voidinitConsumer(String name, Map<String,String> params)Initialize the Consumer when theEventBundlePipeis initializedbooleanreceiveMessage(List<T> messages)Callback when a batch of messages is availablevoidshutdown()Shutdown the consumer when theEventBundlePipeis shutdownbooleanwaitForCompletion(long timeoutMillis)Wait until consumer is done
-
-
-
Method Detail
-
initConsumer
void initConsumer(String name, Map<String,String> params)
Initialize the Consumer when theEventBundlePipeis initialized
-
receiveMessage
boolean receiveMessage(List<T> messages)
Callback when a batch of messages is available
-
shutdown
void shutdown() throws InterruptedExceptionShutdown the consumer when theEventBundlePipeis shutdown- Throws:
InterruptedException
-
waitForCompletion
boolean waitForCompletion(long timeoutMillis) throws InterruptedExceptionWait until consumer is done- Throws:
InterruptedException
-
-