Spring Integration

org.springframework.integration.context
Class IntegrationObjectSupport

java.lang.Object
  extended by org.springframework.integration.context.IntegrationObjectSupport
All Implemented Interfaces:
org.springframework.beans.factory.Aware, org.springframework.beans.factory.BeanFactoryAware, org.springframework.beans.factory.BeanNameAware, org.springframework.beans.factory.InitializingBean, NamedComponent
Direct Known Subclasses:
AbstractConnectionFactory, AbstractEndpoint, AbstractMailReceiver, AbstractMessageChannel, AbstractMessageHandler, AbstractTransformer, CharacterStreamReadingMessageSource, DelayHandler, DirectMessageReceivingMessageSource, FeedEntryMessageSource, FileReadingMessageSource, JdbcPollingChannelAdapter, JmsDestinationPollingSource, MentionsReceivingMessageSource, SearchReceivingMessageSource, StoredProcPollingChannelAdapter, TimelineReceivingMessageSource

public abstract class IntegrationObjectSupport
extends java.lang.Object
implements org.springframework.beans.factory.BeanNameAware, NamedComponent, org.springframework.beans.factory.BeanFactoryAware, org.springframework.beans.factory.InitializingBean

A base class that provides convenient access to the bean factory as well as 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.

Author:
Mark Fisher, Oleg Zhurakousky, Josh Long

Field Summary
protected  org.apache.commons.logging.Log logger
          Logger that is available to subclasses
 
Constructor Summary
IntegrationObjectSupport()
           
 
Method Summary
 void afterPropertiesSet()
           
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.
protected  org.springframework.core.convert.ConversionService getConversionService()
           
protected  org.springframework.scheduling.TaskScheduler getTaskScheduler()
           
protected  void onInit()
          Subclasses may implement this for initialization logic.
 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()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

logger

protected final org.apache.commons.logging.Log logger
Logger that is available to subclasses

Constructor Detail

IntegrationObjectSupport

public IntegrationObjectSupport()
Method Detail

setBeanName

public final void setBeanName(java.lang.String beanName)
Specified by:
setBeanName in interface org.springframework.beans.factory.BeanNameAware

getComponentName

public final java.lang.String getComponentName()
Will return the name of this component identified by componentName field. If componentName was not set this method will default to the 'beanName' of this component;

Specified by:
getComponentName in interface NamedComponent

setComponentName

public void setComponentName(java.lang.String componentName)
Sets the name of this component.

Parameters:
componentName -

getComponentType

public java.lang.String getComponentType()
Subclasses may implement this method to provide component type information.

Specified by:
getComponentType in interface NamedComponent

setBeanFactory

public final void setBeanFactory(org.springframework.beans.factory.BeanFactory beanFactory)
Specified by:
setBeanFactory in interface org.springframework.beans.factory.BeanFactoryAware

afterPropertiesSet

public final void afterPropertiesSet()
Specified by:
afterPropertiesSet in interface org.springframework.beans.factory.InitializingBean

onInit

protected void onInit()
               throws java.lang.Exception
Subclasses may implement this for initialization logic.

Throws:
java.lang.Exception

getBeanFactory

protected final org.springframework.beans.factory.BeanFactory getBeanFactory()

getTaskScheduler

protected org.springframework.scheduling.TaskScheduler getTaskScheduler()

setTaskScheduler

protected void setTaskScheduler(org.springframework.scheduling.TaskScheduler taskScheduler)

getConversionService

protected final org.springframework.core.convert.ConversionService getConversionService()

setConversionService

protected void setConversionService(org.springframework.core.convert.ConversionService conversionService)

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

Spring Integration