Class ResourceRetrievingMessageSource

java.lang.Object
org.springframework.integration.util.AbstractExpressionEvaluator
org.springframework.integration.endpoint.AbstractMessageSource<org.springframework.core.io.Resource[]>
org.springframework.integration.resource.ResourceRetrievingMessageSource
All Implemented Interfaces:
org.springframework.beans.factory.Aware, org.springframework.beans.factory.BeanFactoryAware, org.springframework.beans.factory.BeanNameAware, org.springframework.beans.factory.DisposableBean, org.springframework.beans.factory.InitializingBean, org.springframework.context.ApplicationContextAware, MessageSource<org.springframework.core.io.Resource[]>, IntegrationPattern, NamedComponent, IntegrationInboundManagement, IntegrationManagement

public class ResourceRetrievingMessageSource extends AbstractMessageSource<org.springframework.core.io.Resource[]> implements org.springframework.context.ApplicationContextAware
Implementation of MessageSource based on ResourcePatternResolver which will attempt to resolve Resources based on the pattern specified.
Since:
2.1
  • Constructor Details

    • ResourceRetrievingMessageSource

      public ResourceRetrievingMessageSource(String pattern)
  • Method Details

    • setPatternResolver

      public void setPatternResolver(org.springframework.core.io.support.ResourcePatternResolver patternResolver)
    • setFilter

      public void setFilter(CollectionFilter<org.springframework.core.io.Resource> filter)
    • setApplicationContext

      public void setApplicationContext(org.springframework.context.ApplicationContext applicationContext)
      Specified by:
      setApplicationContext in interface org.springframework.context.ApplicationContextAware
    • getComponentType

      public String getComponentType()
      Specified by:
      getComponentType in interface NamedComponent
    • onInit

      protected void onInit()
      Overrides:
      onInit in class AbstractExpressionEvaluator
    • doReceive

      protected org.springframework.core.io.Resource[] doReceive()
      Description copied from class: AbstractMessageSource
      Subclasses must implement this method. Typically the returned value will be the payload of type T, but the returned value may also be a Message instance whose payload is of type T; also can be AbstractIntegrationMessageBuilder which is used for additional headers population.
      Specified by:
      doReceive in class AbstractMessageSource<org.springframework.core.io.Resource[]>
      Returns:
      The value returned.