public class ConcurrentMessageProcessor
extends java.lang.Object
implements java.lang.Runnable
| Constructor and Description |
|---|
ConcurrentMessageProcessor(MessageProducer messageProducer,
MessageConsumer messageConsumer) |
| Modifier and Type | Method and Description |
|---|---|
java.util.concurrent.Future<java.lang.Void> |
beginProcessing(java.util.concurrent.ExecutorService executorService)
Start a thread that listens for messages in the message producer and forwards them to the message consumer.
|
protected void |
processingEnded() |
protected void |
processingStarted() |
void |
run() |
static java.util.concurrent.Future<java.lang.Void> |
startProcessing(MessageProducer messageProducer,
MessageConsumer messageConsumer,
java.util.concurrent.ExecutorService executorService)
Deprecated.
Please use the non-static ConcurrentMessageProcessor.beginProcessing() instead.
|
static java.util.concurrent.Future<java.lang.Void> |
wrapFuture(java.util.concurrent.Future<?> result,
MessageProducer messageProducer) |
public ConcurrentMessageProcessor(MessageProducer messageProducer, MessageConsumer messageConsumer)
@Deprecated public static java.util.concurrent.Future<java.lang.Void> startProcessing(MessageProducer messageProducer, MessageConsumer messageConsumer, java.util.concurrent.ExecutorService executorService)
messageProducer - - produces messages, e.g. by reading from an input channelmessageConsumer - - processes messages and potentially forwards them to other consumersexecutorService - - the thread is started using this servicepublic static java.util.concurrent.Future<java.lang.Void> wrapFuture(java.util.concurrent.Future<?> result,
MessageProducer messageProducer)
public java.util.concurrent.Future<java.lang.Void> beginProcessing(java.util.concurrent.ExecutorService executorService)
executorService - - the thread is started using this servicepublic void run()
run in interface java.lang.Runnableprotected void processingStarted()
protected void processingEnded()