org.springframework.integration.dispatcher
Class DefaultMessageDispatcher
java.lang.Object
org.springframework.integration.dispatcher.DefaultMessageDispatcher
- All Implemented Interfaces:
- org.springframework.context.Lifecycle, MessageDispatcher, MessagingTaskSchedulerAware
public class DefaultMessageDispatcher
- extends java.lang.Object
- implements MessageDispatcher, MessagingTaskSchedulerAware
Default implementation of MessageDispatcher
. For a non-broadcasting
MessageChannel
(point-to-point), each handler can be registered with
a Schedule
. If the channel is broadcasting (publish-subscribe), the
handlers will all be scheduled together according to the dispatcher's
defaultSchedule
.
- Author:
- Mark Fisher
Field Summary |
protected org.apache.commons.logging.Log |
logger
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
logger
protected org.apache.commons.logging.Log logger
DefaultMessageDispatcher
public DefaultMessageDispatcher(MessageChannel channel)
setMessagingTaskScheduler
public void setMessagingTaskScheduler(MessagingTaskScheduler scheduler)
- Specified by:
setMessagingTaskScheduler
in interface MessagingTaskSchedulerAware
setDefaultSchedule
public void setDefaultSchedule(Schedule defaultSchedule)
addHandler
public void addHandler(MessageHandler handler)
- Specified by:
addHandler
in interface MessageDispatcher
addHandler
public void addHandler(MessageHandler handler,
Schedule schedule)
- Specified by:
addHandler
in interface MessageDispatcher
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