public class ConsumerEndpointFactoryBean extends Object implements FactoryBean<AbstractEndpoint>, BeanFactoryAware, BeanNameAware, BeanClassLoaderAware, InitializingBean, SmartLifecycle, DisposableBean
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.OBJECT_TYPE_ATTRIBUTE
DEFAULT_PHASE
Constructor and Description |
---|
ConsumerEndpointFactoryBean() |
Modifier and Type | Method and Description |
---|---|
void |
afterPropertiesSet() |
void |
destroy() |
AbstractEndpoint |
getObject() |
Class<?> |
getObjectType() |
int |
getPhase() |
boolean |
isAutoStartup() |
boolean |
isRunning() |
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 the
DestinationResolver strategy to use. |
void |
setHandler(Object handler) |
void |
setInputChannel(MessageChannel inputChannel) |
void |
setInputChannelName(String inputChannelName) |
void |
setPhase(int phase) |
void |
setPollerMetadata(PollerMetadata pollerMetadata) |
void |
setRole(String role) |
void |
setTaskScheduler(TaskScheduler taskScheduler) |
void |
start() |
void |
stop() |
void |
stop(Runnable callback) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
isSingleton
public void setHandler(Object handler)
public void setInputChannel(MessageChannel inputChannel)
public void setInputChannelName(String inputChannelName)
public void setPollerMetadata(PollerMetadata pollerMetadata)
public void setChannelResolver(DestinationResolver<MessageChannel> channelResolver)
DestinationResolver
strategy to use.
The default is a BeanFactoryChannelResolver.channelResolver
- The channel resolver.public void setBeanClassLoader(ClassLoader classLoader)
setBeanClassLoader
in interface BeanClassLoaderAware
public void setAutoStartup(Boolean autoStartup)
public void setPhase(int phase)
public void setRole(String role)
public void setBeanName(String beanName)
setBeanName
in interface BeanNameAware
public void setBeanFactory(BeanFactory beanFactory)
setBeanFactory
in interface BeanFactoryAware
public void setTaskScheduler(TaskScheduler taskScheduler)
public void afterPropertiesSet()
afterPropertiesSet
in interface InitializingBean
public AbstractEndpoint getObject()
getObject
in interface FactoryBean<AbstractEndpoint>
public Class<?> getObjectType()
getObjectType
in interface FactoryBean<AbstractEndpoint>
public boolean isAutoStartup()
isAutoStartup
in interface SmartLifecycle
public int getPhase()
getPhase
in interface Phased
getPhase
in interface SmartLifecycle
public void stop(Runnable callback)
stop
in interface SmartLifecycle
public void destroy()
destroy
in interface DisposableBean