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, Christian Tzolov
-
Field Summary
Fields inherited from interface org.springframework.beans.factory.FactoryBean
OBJECT_TYPE_ATTRIBUTE
Fields inherited from interface org.springframework.context.SmartLifecycle
DEFAULT_PHASE
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
void
destroy()
Class<?>
int
getPhase()
boolean
boolean
void
setAdviceChain
(List<Advice> adviceChain) void
setAutoStartup
(Boolean autoStartup) void
setBeanClassLoader
(ClassLoader classLoader) void
setBeanFactory
(BeanFactory beanFactory) void
setBeanName
(String beanName) void
setChannelResolver
(DestinationResolver<MessageChannel> channelResolver) Specify theDestinationResolver
strategy to use.void
setHandler
(Object handler) void
setInputChannel
(MessageChannel inputChannel) void
setInputChannelName
(String inputChannelName) void
setPhase
(int phase) void
setPollerMetadata
(PollerMetadata pollerMetadata) void
setReactiveCustomizer
(Function<? super reactor.core.publisher.Flux<Message<?>>, ? extends org.reactivestreams.Publisher<Message<?>>> reactiveCustomizer) void
void
setTaskScheduler
(TaskScheduler taskScheduler) void
start()
void
stop()
void
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.springframework.beans.factory.FactoryBean
isSingleton
-
Constructor Details
-
ConsumerEndpointFactoryBean
public ConsumerEndpointFactoryBean()
-
-
Method Details
-
setHandler
-
getHandler
-
setInputChannel
-
setInputChannelName
-
setPollerMetadata
-
setReactiveCustomizer
-
setChannelResolver
Specify theDestinationResolver
strategy to use. The default is a BeanFactoryChannelResolver.- Parameters:
channelResolver
- The channel resolver.- Since:
- 4.1.3
-
setBeanClassLoader
- Specified by:
setBeanClassLoader
in interfaceBeanClassLoaderAware
-
setAutoStartup
-
setPhase
public void setPhase(int phase) -
setRole
-
setBeanName
- Specified by:
setBeanName
in interfaceBeanNameAware
-
setBeanFactory
- Specified by:
setBeanFactory
in interfaceBeanFactoryAware
-
setAdviceChain
-
setTaskScheduler
-
afterPropertiesSet
public void afterPropertiesSet()- Specified by:
afterPropertiesSet
in interfaceInitializingBean
-
getObject
- Specified by:
getObject
in interfaceFactoryBean<AbstractEndpoint>
-
getObjectType
- Specified by:
getObjectType
in interfaceFactoryBean<AbstractEndpoint>
-
isAutoStartup
public boolean isAutoStartup()- Specified by:
isAutoStartup
in interfaceSmartLifecycle
-
getPhase
public int getPhase()- Specified by:
getPhase
in interfacePhased
- Specified by:
getPhase
in interfaceSmartLifecycle
-
isRunning
public boolean isRunning() -
start
public void start() -
stop
public void stop() -
stop
- Specified by:
stop
in interfaceSmartLifecycle
-
destroy
public void destroy()- Specified by:
destroy
in interfaceDisposableBean
-