|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.springframework.integration.channel.AbstractMessageChannel org.springframework.integration.channel.AbstractSubscribableChannel org.springframework.integration.channel.PublishSubscribeChannel
public class PublishSubscribeChannel
A channel that sends Messages to each of its subscribers.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class org.springframework.integration.channel.AbstractMessageChannel |
---|
AbstractMessageChannel.ChannelInterceptorList |
Constructor Summary | |
---|---|
PublishSubscribeChannel()
Create a PublishSubscribeChannel that will invoke the handlers in the message sender's thread. |
|
PublishSubscribeChannel(org.springframework.core.task.TaskExecutor taskExecutor)
Create a PublishSubscribeChannel that will use a TaskExecutor
to invoke the handlers. |
Method Summary | |
---|---|
protected BroadcastingDispatcher |
getDispatcher()
|
void |
setApplySequence(boolean applySequence)
Specify whether to apply the sequence number and size headers to the messages prior to invoking the subscribed handlers. |
void |
setBeanFactory(org.springframework.beans.factory.BeanFactory beanFactory)
Callback method for the BeanFactoryAware interface. |
void |
setErrorHandler(org.springframework.util.ErrorHandler errorHandler)
Provide an ErrorHandler strategy for handling Exceptions that
occur downstream from this channel. |
void |
setIgnoreFailures(boolean ignoreFailures)
Specify whether failures for one or more of the handlers should be ignored. |
Methods inherited from class org.springframework.integration.channel.AbstractSubscribableChannel |
---|
doSend, subscribe, unsubscribe |
Methods inherited from class org.springframework.integration.channel.AbstractMessageChannel |
---|
addInterceptor, getInterceptors, getName, send, send, setBeanName, setConversionService, setDatatypes, setInterceptors, toString |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface org.springframework.integration.core.MessageChannel |
---|
getName, send, send |
Constructor Detail |
---|
public PublishSubscribeChannel(org.springframework.core.task.TaskExecutor taskExecutor)
TaskExecutor
to invoke the handlers. If this is null, each invocation will occur in
the message sender's thread.
public PublishSubscribeChannel()
Method Detail |
---|
public void setErrorHandler(org.springframework.util.ErrorHandler errorHandler)
ErrorHandler
strategy for handling Exceptions that
occur downstream from this channel. This will only be applied if
a TaskExecutor has been configured to dispatch the Messages for this
channel. Otherwise, Exceptions will be thrown directly within the
sending Thread. If no ErrorHandler is provided, and this channel does
delegate its dispatching to a TaskExecutor, the default strategy is
a MessagePublishingErrorHandler
that sends error messages to
the failed request Message's error channel header if available or to
the default 'errorChannel' otherwise.
PublishSubscribeChannel(TaskExecutor)
public void setIgnoreFailures(boolean ignoreFailures)
false
meaning that an Exception
will be thrown whenever a handler fails. To override this and suppress
Exceptions, set the value to true
.
public void setApplySequence(boolean applySequence)
false
meaning that sequence headers will
not be applied. If planning to use an Aggregator downstream
with the default correlation and completion strategies, you should set
this flag to true
.
public void setBeanFactory(org.springframework.beans.factory.BeanFactory beanFactory)
BeanFactoryAware
interface.
setBeanFactory
in interface org.springframework.beans.factory.BeanFactoryAware
setBeanFactory
in class AbstractMessageChannel
protected BroadcastingDispatcher getDispatcher()
getDispatcher
in class AbstractSubscribableChannel
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |