org.springframework.integration.handler
Class ConcurrentHandler
java.lang.Object
org.springframework.integration.handler.ConcurrentHandler
- All Implemented Interfaces:
- org.springframework.beans.factory.InitializingBean, org.springframework.context.Lifecycle, MessageHandler
public class ConcurrentHandler
- extends java.lang.Object
- implements MessageHandler, org.springframework.context.Lifecycle, org.springframework.beans.factory.InitializingBean
A MessageHandler
implementation that encapsulates a
ThreadPoolTaskExecutor
and delegates to a wrapped handler for
concurrent, asynchronous message handling.
- Author:
- Mark Fisher
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ConcurrentHandler
public ConcurrentHandler(MessageHandler handler)
ConcurrentHandler
public ConcurrentHandler(MessageHandler handler,
ConcurrencyPolicy concurrencyPolicy)
setExecutor
public void setExecutor(org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor executor)
setErrorHandler
public void setErrorHandler(ErrorHandler errorHandler)
setReplyHandler
public void setReplyHandler(ReplyHandler replyHandler)
afterPropertiesSet
public void afterPropertiesSet()
- Specified by:
afterPropertiesSet
in interface org.springframework.beans.factory.InitializingBean
refreshExecutor
public void refreshExecutor()
isRunning
public boolean isRunning()
- Specified by:
isRunning
in interface org.springframework.context.Lifecycle
start
public void start()
- Specified by:
start
in interface org.springframework.context.Lifecycle
stop
public void stop()
- Specified by:
stop
in interface org.springframework.context.Lifecycle
handle
public Message<?> handle(Message<?> message)
- Specified by:
handle
in interface MessageHandler