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 target IntegrationComponentSpec 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

    Fields 
    Modifier and Type Field Description
    protected static org.springframework.expression.spel.standard.SpelExpressionParser PARSER  
    protected T target  

    Fields inherited from class org.springframework.beans.factory.config.AbstractFactoryBean

    logger

    Fields inherited from interface org.springframework.beans.factory.FactoryBean

    OBJECT_TYPE_ATTRIBUTE

    Fields inherited from interface org.springframework.context.SmartLifecycle

    DEFAULT_PHASE
  • 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)  

    Methods inherited from class org.springframework.beans.factory.config.AbstractFactoryBean

    afterPropertiesSet, destroy, getBeanFactory, getBeanTypeConverter, getEarlySingletonInterfaces, getObject, isSingleton, setBeanClassLoader, setBeanFactory, setSingleton

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • PARSER

      protected static final org.springframework.expression.spel.standard.SpelExpressionParser PARSER
    • target

      protected volatile T target
  • Constructor Details

  • Method Details

    • id

      protected S id​(java.lang.String idToSet)
      Configure the component identifier. Used as the beanName 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

      public T get()
      Returns:
      the configured component.
    • getObjectType

      public java.lang.Class<?> getObjectType()
      Specified by:
      getObjectType in interface org.springframework.beans.factory.FactoryBean<S extends IntegrationComponentSpec<S,​T>>
      Specified by:
      getObjectType in class org.springframework.beans.factory.config.AbstractFactoryBean<T>
    • createInstance

      protected T createInstance()
      Specified by:
      createInstance in class org.springframework.beans.factory.config.AbstractFactoryBean<T>
    • destroyInstance

      protected void destroyInstance​(T instance)
      Overrides:
      destroyInstance in class org.springframework.beans.factory.config.AbstractFactoryBean<T>
    • start

      public void start()
      Specified by:
      start in interface org.springframework.context.Lifecycle
    • stop

      public void stop()
      Specified by:
      stop in interface org.springframework.context.Lifecycle
    • isRunning

      public boolean isRunning()
      Specified by:
      isRunning in interface org.springframework.context.Lifecycle
    • isAutoStartup

      public boolean isAutoStartup()
      Specified by:
      isAutoStartup in interface org.springframework.context.SmartLifecycle
    • stop

      public void stop​(java.lang.Runnable callback)
      Specified by:
      stop in interface org.springframework.context.SmartLifecycle
    • getPhase

      public int getPhase()
      Specified by:
      getPhase in interface org.springframework.context.Phased
      Specified by:
      getPhase in interface org.springframework.context.SmartLifecycle
    • _this

      protected final S _this()
    • doGet

      protected T doGet()