Class IntegrationComponentSpec<S extends IntegrationComponentSpec<S,T>,T>
java.lang.Object
org.springframework.integration.dsl.IntegrationComponentSpec<S,T>
- Type Parameters:
S
- the targetIntegrationComponentSpec
implementation type.T
- the target type.
- All Implemented Interfaces:
DisposableBean
,FactoryBean<T>
,InitializingBean
,Lifecycle
,Phased
,SmartLifecycle
- Direct Known Subclasses:
AbstractConnectionFactorySpec
,BroadcastPublishSubscribeSpec
,EndpointSpec
,JmsDestinationAccessorSpec
,JmsOutboundGatewaySpec.ReplyContainerSpec
,KafkaMessageListenerContainerSpec
,KafkaTemplateSpec
,MessageChannelSpec
,MessageHandlerSpec
,MessageListenerContainerSpec
,MessageProcessorSpec
,MessageProducerSpec
,MessageSourceSpec
,MessagingGatewaySpec
,PollerSpec
,WireTapSpec
@IntegrationDsl
public abstract class IntegrationComponentSpec<S extends IntegrationComponentSpec<S,T>,T>
extends Object
implements FactoryBean<T>, InitializingBean, DisposableBean, SmartLifecycle
The common Builder abstraction.
If used as a bean definition, must be treated as an
FactoryBean
,
therefore its getObject()
method must not be called in the target configuration.- Since:
- 5.0
- Author:
- Artem Bilan
-
Field Summary
Modifier and TypeFieldDescriptionprotected final Log
protected static final SpelExpressionParser
protected T
Fields inherited from interface org.springframework.beans.factory.FactoryBean
OBJECT_TYPE_ATTRIBUTE
Fields inherited from interface org.springframework.context.SmartLifecycle
DEFAULT_PHASE
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected final S
_this()
void
void
destroy()
protected T
doGet()
get()
Deprecated, for removal: This API element is subject to removal in a future version.final String
getId()
!!! This method must not be called from the target configuration !!!Class<?>
int
getPhase()
protected S
Configure the component identifier.boolean
boolean
void
start()
void
stop()
void
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.springframework.beans.factory.FactoryBean
isSingleton
-
Field Details
-
PARSER
-
logger
-
target
-
-
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
Deprecated, for removal: This API element is subject to removal in a future version.since 6.1 with no-op for end-user: thegetObject()
is called by the framework at the appropriate phase.- Returns:
- the configured component.
-
getObjectType
- Specified by:
getObjectType
in interfaceFactoryBean<S extends IntegrationComponentSpec<S,
T>>
-
getObject
!!! This method must not be called from the target configuration !!!- Specified by:
getObject
in interfaceFactoryBean<S extends IntegrationComponentSpec<S,
T>> - Returns:
- the object backed by this factory bean.
-
afterPropertiesSet
public void afterPropertiesSet()- Specified by:
afterPropertiesSet
in interfaceInitializingBean
-
destroy
public void destroy()- Specified by:
destroy
in interfaceDisposableBean
-
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
-
getObject()
is called by the framework at the appropriate phase.