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:
org.springframework.beans.factory.Aware,org.springframework.beans.factory.BeanClassLoaderAware,org.springframework.beans.factory.BeanFactoryAware,org.springframework.beans.factory.DisposableBean,org.springframework.beans.factory.FactoryBean<reactor.util.function.Tuple2<ConsumerEndpointFactoryBean,MessageFilter>>,org.springframework.beans.factory.InitializingBean,org.springframework.context.Lifecycle,org.springframework.context.Phased,org.springframework.context.SmartLifecycle,ComponentsRegistration
public class FilterEndpointSpec extends ConsumerEndpointSpec<FilterEndpointSpec,MessageFilter>
A
ConsumerEndpointSpec implementation for the MessageFilter.- Since:
- 5.0
-
Field Summary
Fields inherited from class org.springframework.integration.dsl.EndpointSpec
componentsToRegister, endpointFactoryBean, handlerFields inherited from class org.springframework.integration.dsl.IntegrationComponentSpec
PARSER, target -
Constructor Summary
Constructors Modifier Constructor Description protectedFilterEndpointSpec(MessageFilter messageFilter) -
Method Summary
Modifier and Type Method Description FilterEndpointSpecdiscardChannel(java.lang.String discardChannelName)Specify a channel name where rejected Messages should be sent.FilterEndpointSpecdiscardChannel(org.springframework.messaging.MessageChannel discardChannel)Specify a channel where rejected Messages should be sent.FilterEndpointSpecdiscardFlow(IntegrationFlow discardFlow)Configure a subflow to run for discarded messages instead of adiscardChannel(MessageChannel).FilterEndpointSpecdiscardWithinAdvice(boolean discardWithinAdvice)Set to 'true' if you wish the discard processing to occur within any request handler advice applied to this filter.FilterEndpointSpecthrowExceptionOnRejection(boolean throwExceptionOnRejection)The default value isfalsemeaning 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, transactionalMethods inherited from class org.springframework.integration.dsl.EndpointSpec
assertHandler, getComponentsToRegister, id, obtainInputChannelFromFlow, obtainInputChannelFromFlow, poller, pollerMethods inherited from class org.springframework.integration.dsl.IntegrationComponentSpec
_this, createInstance, destroyInstance, get, getId, getObjectType, getPhase, isAutoStartup, isRunning, start, stop, stop
-
Constructor Details
-
Method Details
-
throwExceptionOnRejection
The default value isfalsemeaning that rejected Messages will be quietly dropped or sent to the discard channel if available. Typically this value would not betruewhen 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
public FilterEndpointSpec discardChannel(org.springframework.messaging.MessageChannel 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)
-