Class FilterEndpointSpec
java.lang.Object
org.springframework.beans.factory.config.AbstractFactoryBean<T>
org.springframework.integration.dsl.IntegrationComponentSpec<S,reactor.util.function.Tuple2<F,H>>
org.springframework.integration.dsl.EndpointSpec<S,ConsumerEndpointFactoryBean,H>
org.springframework.integration.dsl.ConsumerEndpointSpec<FilterEndpointSpec,MessageFilter>
org.springframework.integration.dsl.FilterEndpointSpec
- All Implemented Interfaces:
Aware
,BeanClassLoaderAware
,BeanFactoryAware
,DisposableBean
,FactoryBean<reactor.util.function.Tuple2<ConsumerEndpointFactoryBean,MessageFilter>>
,InitializingBean
,Lifecycle
,Phased
,SmartLifecycle
,ComponentsRegistration
public class FilterEndpointSpec extends ConsumerEndpointSpec<FilterEndpointSpec,MessageFilter>
A
ConsumerEndpointSpec
implementation for the MessageFilter
.- Since:
- 5.0
- Author:
- Artem Bilan
-
Field Summary
Fields inherited from class org.springframework.integration.dsl.EndpointSpec
componentsToRegister, endpointFactoryBean, handler
Fields inherited from class org.springframework.integration.dsl.IntegrationComponentSpec
PARSER, target
-
Constructor Summary
Constructors Modifier Constructor Description protected
FilterEndpointSpec(MessageFilter messageFilter)
-
Method Summary
Modifier and Type Method Description FilterEndpointSpec
discardChannel(String discardChannelName)
Specify a channel name where rejected Messages should be sent.FilterEndpointSpec
discardChannel(MessageChannel discardChannel)
Specify a channel where rejected Messages should be sent.FilterEndpointSpec
discardFlow(IntegrationFlow discardFlow)
Configure a subflow to run for discarded messages instead of adiscardChannel(MessageChannel)
.FilterEndpointSpec
discardWithinAdvice(boolean discardWithinAdvice)
Set to 'true' if you wish the discard processing to occur within any request handler advice applied to this filter.FilterEndpointSpec
throwExceptionOnRejection(boolean throwExceptionOnRejection)
The default value isfalse
meaning that rejected Messages will be quietly dropped or sent to the discard channel if available.Methods inherited from class org.springframework.integration.dsl.ConsumerEndpointSpec
advice, async, autoStartup, customizeMonoReply, doGet, handleMessageAdvice, notPropagatedHeaders, order, phase, poller, requiresReply, role, sendTimeout, taskScheduler, transactional, transactional, transactional, transactional, transactional
Methods inherited from class org.springframework.integration.dsl.EndpointSpec
assertHandler, getComponentsToRegister, id, obtainInputChannelFromFlow, obtainInputChannelFromFlow, poller, poller
Methods inherited from class org.springframework.integration.dsl.IntegrationComponentSpec
_this, createInstance, destroyInstance, get, getId, getObjectType, getPhase, isAutoStartup, isRunning, start, stop, stop
Methods inherited from class org.springframework.beans.factory.config.AbstractFactoryBean
afterPropertiesSet, destroy, getBeanFactory, getBeanTypeConverter, getEarlySingletonInterfaces, getObject, isSingleton, setBeanClassLoader, setBeanFactory, setSingleton
-
Constructor Details
-
Method Details
-
throwExceptionOnRejection
The default value isfalse
meaning that rejected Messages will be quietly dropped or sent to the discard channel if available. Typically this value would not betrue
when a discard channel is provided, but if so, it will still apply (in such a case, the Message will be sent to the discard channel, and then the exception will be thrown).- Parameters:
throwExceptionOnRejection
- the throwExceptionOnRejection.- Returns:
- the endpoint spec.
- See Also:
MessageFilter.setThrowExceptionOnRejection(boolean)
-
discardChannel
Specify a channel where rejected Messages should be sent. If the discard channel is null (the default), rejected Messages will be dropped. However, the 'throwExceptionOnRejection' flag determines whether rejected Messages trigger an exception. That value is evaluated regardless of the presence of a discard channel.- Parameters:
discardChannel
- the discardChannel.- Returns:
- the endpoint spec.
- See Also:
MessageFilter.setDiscardChannel(MessageChannel)
-
discardChannel
Specify a channel name where rejected Messages should be sent. If the discard channel is null (the default), rejected Messages will be dropped. However, the 'throwExceptionOnRejection' flag determines whether rejected Messages trigger an exception. That value is evaluated regardless of the presence of a discard channel.- Parameters:
discardChannelName
- the discardChannelName.- Returns:
- the endpoint spec.
- See Also:
MessageFilter.setDiscardChannelName(String)
-
discardFlow
Configure a subflow to run for discarded messages instead of adiscardChannel(MessageChannel)
.- Parameters:
discardFlow
- the discard flow.- Returns:
- the endpoint spec.
-
discardWithinAdvice
Set to 'true' if you wish the discard processing to occur within any request handler advice applied to this filter. Also applies to throwing an exception on rejection. Default: true.- Parameters:
discardWithinAdvice
- the discardWithinAdvice.- Returns:
- the endpoint spec.
- See Also:
MessageFilter.setDiscardWithinAdvice(boolean)
-