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 targetIntegrationComponentSpec
implementation 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 SpelExpressionParser
PARSER
protected T
target
-
Constructor Summary
Constructors Constructor Description IntegrationComponentSpec()
-
Method Summary
Modifier and Type Method Description protected S
_this()
protected T
createInstance()
protected void
destroyInstance(T instance)
protected T
doGet()
T
get()
String
getId()
Class<?>
getObjectType()
int
getPhase()
protected S
id(String idToSet)
Configure the component identifier.boolean
isAutoStartup()
boolean
isRunning()
void
start()
void
stop()
void
stop(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 thebeanName
to 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:
getObjectType
in interfaceFactoryBean<S extends IntegrationComponentSpec<S,T>>
- Specified by:
getObjectType
in classAbstractFactoryBean<T>
-
createInstance
- Specified by:
createInstance
in classAbstractFactoryBean<T>
-
destroyInstance
- Overrides:
destroyInstance
in classAbstractFactoryBean<T>
-
start
public void start() -
stop
public void stop() -
isRunning
public boolean isRunning() -
isAutoStartup
public boolean isAutoStartup()- Specified by:
isAutoStartup
in interfaceSmartLifecycle
-
stop
- Specified by:
stop
in interfaceSmartLifecycle
-
getPhase
public int getPhase()- Specified by:
getPhase
in interfacePhased
- Specified by:
getPhase
in interfaceSmartLifecycle
-
_this
-
doGet
-