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:
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
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 TcreateInstance()protected voiddestroyInstance(T instance)protected TdoGet()Tget()java.lang.StringgetId()java.lang.Class<?>getObjectType()intgetPhase()protected Sid(java.lang.String idToSet)Configure the component identifier.booleanisAutoStartup()booleanisRunning()voidstart()voidstop()voidstop(java.lang.Runnable callback)
-
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
public final java.lang.String getId() -
get
- Returns:
- the configured component.
-
getObjectType
public java.lang.Class<?> getObjectType()- Specified by:
getObjectTypein interfaceorg.springframework.beans.factory.FactoryBean<S extends IntegrationComponentSpec<S,T>>- Specified by:
getObjectTypein classorg.springframework.beans.factory.config.AbstractFactoryBean<T>
-
createInstance
- Specified by:
createInstancein classorg.springframework.beans.factory.config.AbstractFactoryBean<T>
-
destroyInstance
- Overrides:
destroyInstancein classorg.springframework.beans.factory.config.AbstractFactoryBean<T>
-
start
public void start()- Specified by:
startin interfaceorg.springframework.context.Lifecycle
-
stop
public void stop()- Specified by:
stopin interfaceorg.springframework.context.Lifecycle
-
isRunning
public boolean isRunning()- Specified by:
isRunningin interfaceorg.springframework.context.Lifecycle
-
isAutoStartup
public boolean isAutoStartup()- Specified by:
isAutoStartupin interfaceorg.springframework.context.SmartLifecycle
-
stop
public void stop(java.lang.Runnable callback)- Specified by:
stopin interfaceorg.springframework.context.SmartLifecycle
-
getPhase
public int getPhase()- Specified by:
getPhasein interfaceorg.springframework.context.Phased- Specified by:
getPhasein interfaceorg.springframework.context.SmartLifecycle
-
_this
-
doGet
-