Class IntegrationComponentSpec<S extends IntegrationComponentSpec<S,T>,T>
java.lang.Object
org.springframework.beans.factory.config.AbstractFactoryBean<T>
org.springframework.integration.dsl.IntegrationComponentSpec<S,T>
- Type Parameters:
S- the targetIntegrationComponentSpecimplementation type.T- the target type.
- All Implemented Interfaces:
Aware,BeanClassLoaderAware,BeanFactoryAware,DisposableBean,FactoryBean<T>,InitializingBean,Lifecycle,Phased,SmartLifecycle
- Direct Known Subclasses:
AbstractConnectionFactorySpec,AbstractMessageListenerContainerSpec,BroadcastPublishSubscribeSpec,EndpointSpec,JmsDestinationAccessorSpec,JmsOutboundGatewaySpec.ReplyContainerSpec,KafkaMessageListenerContainerSpec,KafkaTemplateSpec,MessageChannelSpec,MessageHandlerSpec,MessageProcessorSpec,MessageProducerSpec,MessageSourceSpec,MessagingGatewaySpec,PollerSpec,WireTapSpec
public abstract class IntegrationComponentSpec<S extends IntegrationComponentSpec<S,T>,T> extends AbstractFactoryBean<T> implements SmartLifecycle
The common Builder abstraction. The
get() method returns the final component.- Since:
- 5.0
- Author:
- Artem Bilan
-
Field Summary
Fields Modifier and Type Field Description protected static SpelExpressionParserPARSERprotected Ttarget -
Constructor Summary
Constructors Constructor Description IntegrationComponentSpec() -
Method Summary
Modifier and Type Method Description protected S_this()protected TcreateInstance()protected voiddestroyInstance(T instance)protected TdoGet()Tget()StringgetId()Class<?>getObjectType()intgetPhase()protected Sid(String idToSet)Configure the component identifier.booleanisAutoStartup()booleanisRunning()voidstart()voidstop()voidstop(Runnable callback)Methods inherited from class org.springframework.beans.factory.config.AbstractFactoryBean
afterPropertiesSet, destroy, getBeanFactory, getBeanTypeConverter, getEarlySingletonInterfaces, getObject, isSingleton, setBeanClassLoader, setBeanFactory, setSingleton
-
Field Details
-
Constructor Details
-
IntegrationComponentSpec
public IntegrationComponentSpec()
-
-
Method Details
-
id
Configure the component identifier. Used as thebeanNameto register the bean in the application context for this component.- Parameters:
idToSet- the id.- Returns:
- the spec.
-
getId
-
get
- Returns:
- the configured component.
-
getObjectType
- Specified by:
getObjectTypein interfaceFactoryBean<S extends IntegrationComponentSpec<S,T>>- Specified by:
getObjectTypein classAbstractFactoryBean<T>
-
createInstance
- Specified by:
createInstancein classAbstractFactoryBean<T>
-
destroyInstance
- Overrides:
destroyInstancein classAbstractFactoryBean<T>
-
start
public void start() -
stop
public void stop() -
isRunning
public boolean isRunning() -
isAutoStartup
public boolean isAutoStartup()- Specified by:
isAutoStartupin interfaceSmartLifecycle
-
stop
- Specified by:
stopin interfaceSmartLifecycle
-
getPhase
public int getPhase()- Specified by:
getPhasein interfacePhased- Specified by:
getPhasein interfaceSmartLifecycle
-
_this
-
doGet
-