public abstract class IntegrationObjectSupport extends java.lang.Object implements org.springframework.beans.factory.BeanNameAware, NamedComponent, org.springframework.context.ApplicationContextAware, org.springframework.beans.factory.BeanFactoryAware, org.springframework.beans.factory.InitializingBean
TaskScheduler and ConversionService instances.
This is intended to be used as a base class for internal framework components whereas code built upon the integration framework should not require tight coupling with the context but rather rely on standard dependency injection.
| Modifier and Type | Field and Description |
|---|---|
protected org.apache.commons.logging.Log |
logger
Logger that is available to subclasses
|
| Constructor and Description |
|---|
IntegrationObjectSupport() |
| Modifier and Type | Method and Description |
|---|---|
void |
afterPropertiesSet() |
java.lang.String |
getApplicationContextId()
Returns the
ApplicationContext.getId() if the
ApplicationContext is available. |
protected org.springframework.beans.factory.BeanFactory |
getBeanFactory() |
java.lang.String |
getComponentName()
Will return the name of this component identified by
componentName field. |
java.lang.String |
getComponentType()
Subclasses may implement this method to provide component type information.
|
org.springframework.core.convert.ConversionService |
getConversionService() |
protected java.util.Properties |
getIntegrationProperties() |
protected <T> T |
getIntegrationProperty(java.lang.String key,
java.lang.Class<T> tClass) |
protected org.springframework.scheduling.TaskScheduler |
getTaskScheduler() |
protected void |
onInit()
Subclasses may implement this for initialization logic.
|
void |
setApplicationContext(org.springframework.context.ApplicationContext applicationContext) |
void |
setBeanFactory(org.springframework.beans.factory.BeanFactory beanFactory) |
void |
setBeanName(java.lang.String beanName) |
void |
setComponentName(java.lang.String componentName)
Sets the name of this component.
|
protected void |
setConversionService(org.springframework.core.convert.ConversionService conversionService) |
protected void |
setTaskScheduler(org.springframework.scheduling.TaskScheduler taskScheduler) |
java.lang.String |
toString() |
protected final org.apache.commons.logging.Log logger
public final void setBeanName(java.lang.String beanName)
setBeanName in interface org.springframework.beans.factory.BeanNameAwarepublic final java.lang.String getComponentName()
componentName field.
If componentName was not set this method will default to the 'beanName' of this component;getComponentName in interface NamedComponentpublic void setComponentName(java.lang.String componentName)
componentName - public java.lang.String getComponentType()
getComponentType in interface NamedComponentpublic final void setBeanFactory(org.springframework.beans.factory.BeanFactory beanFactory)
setBeanFactory in interface org.springframework.beans.factory.BeanFactoryAwarepublic void setApplicationContext(org.springframework.context.ApplicationContext applicationContext)
throws org.springframework.beans.BeansException
setApplicationContext in interface org.springframework.context.ApplicationContextAwareorg.springframework.beans.BeansExceptionpublic final void afterPropertiesSet()
afterPropertiesSet in interface org.springframework.beans.factory.InitializingBeanprotected void onInit()
throws java.lang.Exception
java.lang.Exceptionprotected final org.springframework.beans.factory.BeanFactory getBeanFactory()
protected org.springframework.scheduling.TaskScheduler getTaskScheduler()
protected void setTaskScheduler(org.springframework.scheduling.TaskScheduler taskScheduler)
public final org.springframework.core.convert.ConversionService getConversionService()
protected void setConversionService(org.springframework.core.convert.ConversionService conversionService)
public java.lang.String getApplicationContextId()
ApplicationContext.getId() if the
ApplicationContext is available.protected java.util.Properties getIntegrationProperties()
protected <T> T getIntegrationProperty(java.lang.String key,
java.lang.Class<T> tClass)
key - Integration property.tClass - the class to convert a value of Integration property.public java.lang.String toString()
toString in class java.lang.Object