Class ConsumerEndpointFactoryBean
java.lang.Object
org.springframework.integration.config.ConsumerEndpointFactoryBean
- All Implemented Interfaces:
org.springframework.beans.factory.Aware,org.springframework.beans.factory.BeanClassLoaderAware,org.springframework.beans.factory.BeanFactoryAware,org.springframework.beans.factory.BeanNameAware,org.springframework.beans.factory.DisposableBean,org.springframework.beans.factory.FactoryBean<AbstractEndpoint>,org.springframework.beans.factory.InitializingBean,org.springframework.context.Lifecycle,org.springframework.context.Phased,org.springframework.context.SmartLifecycle
public class ConsumerEndpointFactoryBean extends java.lang.Object implements org.springframework.beans.factory.FactoryBean<AbstractEndpoint>, org.springframework.beans.factory.BeanFactoryAware, org.springframework.beans.factory.BeanNameAware, org.springframework.beans.factory.BeanClassLoaderAware, org.springframework.beans.factory.InitializingBean, org.springframework.context.SmartLifecycle, org.springframework.beans.factory.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.-
Field Summary
-
Constructor Summary
Constructors Constructor Description ConsumerEndpointFactoryBean() -
Method Summary
Modifier and Type Method Description voidafterPropertiesSet()voiddestroy()AbstractEndpointgetObject()java.lang.Class<?>getObjectType()intgetPhase()booleanisAutoStartup()booleanisRunning()voidsetAdviceChain(java.util.List<org.aopalliance.aop.Advice> adviceChain)voidsetAutoStartup(java.lang.Boolean autoStartup)voidsetBeanClassLoader(java.lang.ClassLoader classLoader)voidsetBeanFactory(org.springframework.beans.factory.BeanFactory beanFactory)voidsetBeanName(java.lang.String beanName)voidsetChannelResolver(org.springframework.messaging.core.DestinationResolver<org.springframework.messaging.MessageChannel> channelResolver)Specify theDestinationResolverstrategy to use.voidsetHandler(java.lang.Object handler)voidsetInputChannel(org.springframework.messaging.MessageChannel inputChannel)voidsetInputChannelName(java.lang.String inputChannelName)voidsetPhase(int phase)voidsetPollerMetadata(PollerMetadata pollerMetadata)voidsetRole(java.lang.String role)voidsetTaskScheduler(org.springframework.scheduling.TaskScheduler taskScheduler)voidstart()voidstop()voidstop(java.lang.Runnable callback)
-
Constructor Details
-
ConsumerEndpointFactoryBean
public ConsumerEndpointFactoryBean()
-
-
Method Details
-
setHandler
public void setHandler(java.lang.Object handler) -
setInputChannel
public void setInputChannel(org.springframework.messaging.MessageChannel inputChannel) -
setInputChannelName
public void setInputChannelName(java.lang.String inputChannelName) -
setPollerMetadata
-
setChannelResolver
public void setChannelResolver(org.springframework.messaging.core.DestinationResolver<org.springframework.messaging.MessageChannel> channelResolver)Specify theDestinationResolverstrategy to use. The default is a BeanFactoryChannelResolver.- Parameters:
channelResolver- The channel resolver.- Since:
- 4.1.3
-
setBeanClassLoader
public void setBeanClassLoader(java.lang.ClassLoader classLoader)- Specified by:
setBeanClassLoaderin interfaceorg.springframework.beans.factory.BeanClassLoaderAware
-
setAutoStartup
public void setAutoStartup(java.lang.Boolean autoStartup) -
setPhase
public void setPhase(int phase) -
setRole
public void setRole(java.lang.String role) -
setBeanName
public void setBeanName(java.lang.String beanName)- Specified by:
setBeanNamein interfaceorg.springframework.beans.factory.BeanNameAware
-
setBeanFactory
public void setBeanFactory(org.springframework.beans.factory.BeanFactory beanFactory)- Specified by:
setBeanFactoryin interfaceorg.springframework.beans.factory.BeanFactoryAware
-
setAdviceChain
public void setAdviceChain(java.util.List<org.aopalliance.aop.Advice> adviceChain) -
setTaskScheduler
public void setTaskScheduler(org.springframework.scheduling.TaskScheduler taskScheduler) -
afterPropertiesSet
public void afterPropertiesSet()- Specified by:
afterPropertiesSetin interfaceorg.springframework.beans.factory.InitializingBean
-
getObject
- Specified by:
getObjectin interfaceorg.springframework.beans.factory.FactoryBean<AbstractEndpoint>
-
getObjectType
public java.lang.Class<?> getObjectType()- Specified by:
getObjectTypein interfaceorg.springframework.beans.factory.FactoryBean<AbstractEndpoint>
-
isAutoStartup
public boolean isAutoStartup()- Specified by:
isAutoStartupin interfaceorg.springframework.context.SmartLifecycle
-
getPhase
public int getPhase()- Specified by:
getPhasein interfaceorg.springframework.context.Phased- Specified by:
getPhasein interfaceorg.springframework.context.SmartLifecycle
-
isRunning
public boolean isRunning()- Specified by:
isRunningin interfaceorg.springframework.context.Lifecycle
-
start
public void start()- Specified by:
startin interfaceorg.springframework.context.Lifecycle
-
stop
public void stop()- Specified by:
stopin interfaceorg.springframework.context.Lifecycle
-
stop
public void stop(java.lang.Runnable callback)- Specified by:
stopin interfaceorg.springframework.context.SmartLifecycle
-
destroy
public void destroy()- Specified by:
destroyin interfaceorg.springframework.beans.factory.DisposableBean
-