Class AbstractFetchLimitingMessageSource<T>
java.lang.Object
org.springframework.integration.util.AbstractExpressionEvaluator
org.springframework.integration.endpoint.AbstractMessageSource<T>
org.springframework.integration.endpoint.AbstractFetchLimitingMessageSource<T>
- Type Parameters:
- T- the expected payload type.
- All Implemented Interfaces:
- Aware,- BeanFactoryAware,- BeanNameAware,- DisposableBean,- InitializingBean,- MessageSource<T>,- IntegrationPattern,- NamedComponent,- IntegrationInboundManagement,- IntegrationManagement,- MessageSourceManagement
- Direct Known Subclasses:
- AbstractInboundFileSynchronizingMessageSource,- AbstractRemoteFileStreamingMessageSource
public abstract class AbstractFetchLimitingMessageSource<T>
extends AbstractMessageSource<T>
implements MessageSourceManagement
A message source that can limit the number of remote objects it fetches.
- Since:
- 5.0
- Author:
- Gary Russell
- 
Nested Class SummaryNested classes/interfaces inherited from interface org.springframework.integration.support.management.IntegrationManagementIntegrationManagement.ManagementOverrides
- 
Field SummaryFields inherited from class org.springframework.integration.util.AbstractExpressionEvaluatorEXPRESSION_PARSER, loggerFields inherited from interface org.springframework.integration.support.management.IntegrationManagementMETER_PREFIX, RECEIVE_COUNTER_NAME, SEND_TIMER_NAME
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionprotected ObjectSubclasses must implement this method.protected abstract ObjectdoReceive(int maxFetchSizeToReceive) Subclasses must implement this method.intReturn the max fetch size.voidsetMaxFetchSize(int maxFetchSize) Set the maximum number of objects the source should fetch if it is necessary to fetch objects.Methods inherited from class org.springframework.integration.endpoint.AbstractMessageSourcebuildMessage, destroy, getBeanName, getComponentName, getManagedName, getManagedType, getOverrides, isLoggingEnabled, receive, registerMetricsCaptor, setBeanName, setHeaderExpressions, setLoggingEnabled, setManagedName, setManagedTypeMethods inherited from class org.springframework.integration.util.AbstractExpressionEvaluatorafterPropertiesSet, evaluateExpression, evaluateExpression, evaluateExpression, evaluateExpression, evaluateExpression, evaluateExpression, evaluateExpression, getBeanFactory, getEvaluationContext, getEvaluationContext, getMessageBuilderFactory, onInit, setBeanFactory, setConversionService, setSimpleEvaluationContextMethods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.springframework.integration.support.management.IntegrationManagementgetThisAs, isObserved, registerObservationRegistryMethods inherited from interface org.springframework.integration.core.MessageSourcegetIntegrationPatternTypeMethods inherited from interface org.springframework.integration.support.context.NamedComponentgetComponentType
- 
Constructor Details- 
AbstractFetchLimitingMessageSourcepublic AbstractFetchLimitingMessageSource()
 
- 
- 
Method Details- 
setMaxFetchSizepublic void setMaxFetchSize(int maxFetchSize) Description copied from interface:MessageSourceManagementSet the maximum number of objects the source should fetch if it is necessary to fetch objects. Setting the maxFetchSize to 0 disables remote fetching, a negative value indicates no limit.- Specified by:
- setMaxFetchSizein interface- MessageSourceManagement
- Parameters:
- maxFetchSize- the max fetch size; a negative value means unlimited.
 
- 
getMaxFetchSizepublic int getMaxFetchSize()Description copied from interface:MessageSourceManagementReturn the max fetch size.- Specified by:
- getMaxFetchSizein interface- MessageSourceManagement
- Returns:
- the max fetch size.
- See Also:
 
- 
doReceiveDescription 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 class- AbstractMessageSource<T>
- Returns:
- The value returned.
 
- 
doReceiveSubclasses 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.- Parameters:
- maxFetchSizeToReceive- the maximum number of messages to fetch if a fetch is necessary.
- Returns:
- The value returned.
 
 
-