Class ConsumerEndpointFactoryBean
java.lang.Object
org.springframework.integration.config.ConsumerEndpointFactoryBean
- All Implemented Interfaces:
Aware,BeanClassLoaderAware,BeanFactoryAware,BeanNameAware,DisposableBean,FactoryBean<AbstractEndpoint>,InitializingBean,Lifecycle,Phased,SmartLifecycle
public class ConsumerEndpointFactoryBean extends Object implements FactoryBean<AbstractEndpoint>, BeanFactoryAware, BeanNameAware, BeanClassLoaderAware, InitializingBean, SmartLifecycle, DisposableBean
The
FactoryBean implementation for AbstractEndpoint population.
Controls all the necessary properties and lifecycle.
According the provided MessageChannel implementation populates
a PollingConsumer for the PollableChannel,
an EventDrivenConsumer for the SubscribableChannel
and ReactiveStreamsConsumer for all other channel implementations.- Author:
- Mark Fisher, Oleg Zhurakousky, Josh Long, Gary Russell, Artem Bilan
-
Field Summary
-
Constructor Summary
Constructors Constructor Description ConsumerEndpointFactoryBean() -
Method Summary
Modifier and Type Method Description voidafterPropertiesSet()voiddestroy()AbstractEndpointgetObject()Class<?>getObjectType()intgetPhase()booleanisAutoStartup()booleanisRunning()voidsetAdviceChain(List<Advice> adviceChain)voidsetAutoStartup(Boolean autoStartup)voidsetBeanClassLoader(ClassLoader classLoader)voidsetBeanFactory(BeanFactory beanFactory)voidsetBeanName(String beanName)voidsetChannelResolver(DestinationResolver<MessageChannel> channelResolver)Specify theDestinationResolverstrategy to use.voidsetHandler(Object handler)voidsetInputChannel(MessageChannel inputChannel)voidsetInputChannelName(String inputChannelName)voidsetPhase(int phase)voidsetPollerMetadata(PollerMetadata pollerMetadata)voidsetReactiveCustomizer(Function<? super reactor.core.publisher.Flux<Message<?>>,? extends org.reactivestreams.Publisher<Message<?>>> reactiveCustomizer)voidsetRole(String role)voidsetTaskScheduler(TaskScheduler taskScheduler)voidstart()voidstop()voidstop(Runnable callback)
-
Constructor Details
-
ConsumerEndpointFactoryBean
public ConsumerEndpointFactoryBean()
-
-
Method Details
-
setHandler
-
setInputChannel
-
setInputChannelName
-
setPollerMetadata
-
setReactiveCustomizer
-
setChannelResolver
Specify theDestinationResolverstrategy to use. The default is a BeanFactoryChannelResolver.- Parameters:
channelResolver- The channel resolver.- Since:
- 4.1.3
-
setBeanClassLoader
- Specified by:
setBeanClassLoaderin interfaceBeanClassLoaderAware
-
setAutoStartup
-
setPhase
public void setPhase(int phase) -
setRole
-
setBeanName
- Specified by:
setBeanNamein interfaceBeanNameAware
-
setBeanFactory
- Specified by:
setBeanFactoryin interfaceBeanFactoryAware
-
setAdviceChain
-
setTaskScheduler
-
afterPropertiesSet
public void afterPropertiesSet()- Specified by:
afterPropertiesSetin interfaceInitializingBean
-
getObject
- Specified by:
getObjectin interfaceFactoryBean<AbstractEndpoint>
-
getObjectType
- Specified by:
getObjectTypein interfaceFactoryBean<AbstractEndpoint>
-
isAutoStartup
public boolean isAutoStartup()- Specified by:
isAutoStartupin interfaceSmartLifecycle
-
getPhase
public int getPhase()- Specified by:
getPhasein interfacePhased- Specified by:
getPhasein interfaceSmartLifecycle
-
isRunning
public boolean isRunning() -
start
public void start() -
stop
public void stop() -
stop
- Specified by:
stopin interfaceSmartLifecycle
-
destroy
public void destroy()- Specified by:
destroyin interfaceDisposableBean
-