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
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.springframework.integration.support.management.IntegrationManagement
IntegrationManagement.ManagementOverrides -
Field Summary
Fields inherited from class org.springframework.integration.util.AbstractExpressionEvaluator
EXPRESSION_PARSER, loggerFields inherited from interface org.springframework.integration.support.management.IntegrationManagement
METER_PREFIX, RECEIVE_COUNTER_NAME, SEND_TIMER_NAME -
Constructor Summary
Constructors Constructor Description ResourceRetrievingMessageSource(java.lang.String pattern) -
Method Summary
Modifier and Type Method Description protected org.springframework.core.io.Resource[]doReceive()Subclasses must implement this method.java.lang.StringgetComponentType()protected voidonInit()voidsetApplicationContext(org.springframework.context.ApplicationContext applicationContext)voidsetFilter(CollectionFilter<org.springframework.core.io.Resource> filter)voidsetPatternResolver(org.springframework.core.io.support.ResourcePatternResolver patternResolver)Methods inherited from class org.springframework.integration.endpoint.AbstractMessageSource
buildMessage, destroy, getBeanName, getComponentName, getManagedName, getManagedType, getOverrides, isLoggingEnabled, receive, registerMetricsCaptor, setBeanName, setHeaderExpressions, setLoggingEnabled, setManagedName, setManagedTypeMethods inherited from class org.springframework.integration.util.AbstractExpressionEvaluator
afterPropertiesSet, evaluateExpression, evaluateExpression, evaluateExpression, evaluateExpression, evaluateExpression, evaluateExpression, evaluateExpression, getBeanFactory, getEvaluationContext, getEvaluationContext, getMessageBuilderFactory, setBeanFactory, setConversionServiceMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.springframework.integration.support.management.IntegrationManagement
getThisAsMethods inherited from interface org.springframework.integration.core.MessageSource
getIntegrationPatternType
-
Constructor Details
-
ResourceRetrievingMessageSource
public ResourceRetrievingMessageSource(java.lang.String pattern)
-
-
Method Details
-
setPatternResolver
public void setPatternResolver(org.springframework.core.io.support.ResourcePatternResolver patternResolver) -
setFilter
-
setApplicationContext
public void setApplicationContext(org.springframework.context.ApplicationContext applicationContext)- Specified by:
setApplicationContextin interfaceorg.springframework.context.ApplicationContextAware
-
getComponentType
public java.lang.String getComponentType()- Specified by:
getComponentTypein interfaceNamedComponent
-
onInit
protected void onInit()- Overrides:
onInitin classAbstractExpressionEvaluator
-
doReceive
protected org.springframework.core.io.Resource[] doReceive()Description copied from class:AbstractMessageSourceSubclasses must implement this method. Typically the returned value will be thepayloadof type T, but the returned value may also be aMessageinstance whose payload is of type T; also can beAbstractIntegrationMessageBuilderwhich is used for additional headers population.- Specified by:
doReceivein classAbstractMessageSource<org.springframework.core.io.Resource[]>- Returns:
- The value returned.
-