Spring Integration

org.springframework.integration.context
Class IntegrationObjectSupport

java.lang.Object
  extended by org.springframework.integration.context.IntegrationObjectSupport
All Implemented Interfaces:
BeanFactoryAware, BeanNameAware, InitializingBean, NamedComponent
Direct Known Subclasses:
AbstractEndpoint, AbstractEventDrivenFileMonitor, AbstractJmsTemplateBasedAdapter, AbstractMessageChannel, AbstractMessageHandler, DelayHandler, MessageSendingFileAdditionListener

public abstract class IntegrationObjectSupport
extends Object
implements BeanNameAware, NamedComponent, BeanFactoryAware, 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  BeanFactory getBeanFactory()
           
 String getComponentName()
          Will return the name of this component identified by componentName field.
 String getComponentType()
          Subclasses may implement this method to provide component type information.
protected  ConversionService getConversionService()
           
protected  MetadataPersister getRequiredMetadataPersister()
           
protected  TaskScheduler getTaskScheduler()
           
protected  void onInit()
          Subclasses may implement this for initialization logic.
 void setBeanFactory(BeanFactory beanFactory)
           
 void setBeanName(String beanName)
           
 void setComponentName(String componentName)
          Sets the name of this component.
protected  void setConversionService(ConversionService conversionService)
           
protected  void setTaskScheduler(TaskScheduler taskScheduler)
           
 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(String beanName)
Specified by:
setBeanName in interface BeanNameAware

getComponentName

public final 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(String componentName)
Sets the name of this component.

Parameters:
componentName -

getComponentType

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

Specified by:
getComponentType in interface NamedComponent

setBeanFactory

public final void setBeanFactory(BeanFactory beanFactory)
Specified by:
setBeanFactory in interface BeanFactoryAware

afterPropertiesSet

public final void afterPropertiesSet()
Specified by:
afterPropertiesSet in interface InitializingBean

onInit

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

Throws:
Exception

getBeanFactory

protected final BeanFactory getBeanFactory()

getRequiredMetadataPersister

protected MetadataPersister getRequiredMetadataPersister()

getTaskScheduler

protected TaskScheduler getTaskScheduler()

setTaskScheduler

protected void setTaskScheduler(TaskScheduler taskScheduler)

getConversionService

protected final ConversionService getConversionService()

setConversionService

protected void setConversionService(ConversionService conversionService)

toString

public String toString()
Overrides:
toString in class Object

Spring Integration

Copyright © 2010. All Rights Reserved.