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:
org.springframework.beans.factory.Aware
,org.springframework.beans.factory.BeanClassLoaderAware
,org.springframework.beans.factory.BeanFactoryAware
,org.springframework.beans.factory.DisposableBean
,org.springframework.beans.factory.FactoryBean<T>
,org.springframework.beans.factory.InitializingBean
,org.springframework.context.Lifecycle
,org.springframework.context.Phased
,org.springframework.context.SmartLifecycle
- Direct Known Subclasses:
BroadcastPublishSubscribeSpec
,EndpointSpec
,MessageChannelSpec
,MessageHandlerSpec
,MessageProcessorSpec
,MessageProducerSpec
,MessageSourceSpec
,MessagingGatewaySpec
,PollerSpec
,WireTapSpec
@IntegrationDsl public abstract class IntegrationComponentSpec<S extends IntegrationComponentSpec<S,T>,T> extends org.springframework.beans.factory.config.AbstractFactoryBean<T> implements org.springframework.context.SmartLifecycle
The common Builder abstraction. The
get()
method returns the final component.- Since:
- 5.0
-
Field Summary
-
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()
java.lang.String
getId()
java.lang.Class<?>
getObjectType()
int
getPhase()
protected S
id(java.lang.String idToSet)
Configure the component identifier.boolean
isAutoStartup()
boolean
isRunning()
void
start()
void
stop()
void
stop(java.lang.Runnable callback)
-
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
public final java.lang.String getId() -
get
- Returns:
- the configured component.
-
getObjectType
public java.lang.Class<?> getObjectType()- Specified by:
getObjectType
in interfaceorg.springframework.beans.factory.FactoryBean<S extends IntegrationComponentSpec<S,T>>
- Specified by:
getObjectType
in classorg.springframework.beans.factory.config.AbstractFactoryBean<T>
-
createInstance
- Specified by:
createInstance
in classorg.springframework.beans.factory.config.AbstractFactoryBean<T>
-
destroyInstance
- Overrides:
destroyInstance
in classorg.springframework.beans.factory.config.AbstractFactoryBean<T>
-
start
public void start()- Specified by:
start
in interfaceorg.springframework.context.Lifecycle
-
stop
public void stop()- Specified by:
stop
in interfaceorg.springframework.context.Lifecycle
-
isRunning
public boolean isRunning()- Specified by:
isRunning
in interfaceorg.springframework.context.Lifecycle
-
isAutoStartup
public boolean isAutoStartup()- Specified by:
isAutoStartup
in interfaceorg.springframework.context.SmartLifecycle
-
stop
public void stop(java.lang.Runnable callback)- Specified by:
stop
in interfaceorg.springframework.context.SmartLifecycle
-
getPhase
public int getPhase()- Specified by:
getPhase
in interfaceorg.springframework.context.Phased
- Specified by:
getPhase
in interfaceorg.springframework.context.SmartLifecycle
-
_this
-
doGet
-