public abstract class AbstractFetchLimitingMessageSource<T> extends AbstractMessageSource<T> implements MessageSourceManagement
IntegrationManagement.ManagementOverrides
EXPRESSION_PARSER, logger
METER_PREFIX, RECEIVE_COUNTER_NAME, SEND_TIMER_NAME
Constructor and Description |
---|
AbstractFetchLimitingMessageSource() |
Modifier and Type | Method and Description |
---|---|
protected Object |
doReceive()
Subclasses must implement this method.
|
protected abstract Object |
doReceive(int maxFetchSizeToReceive)
Subclasses must implement this method.
|
int |
getMaxFetchSize()
Return the max fetch size.
|
void |
setMaxFetchSize(int maxFetchSize)
Set the maximum number of objects the source should fetch if it is necessary to
fetch objects.
|
buildMessage, destroy, getBeanName, getComponentName, getManagedName, getManagedType, getOverrides, isLoggingEnabled, receive, registerMetricsCaptor, setBeanName, setHeaderExpressions, setLoggingEnabled, setManagedName, setManagedType
afterPropertiesSet, evaluateExpression, evaluateExpression, evaluateExpression, evaluateExpression, evaluateExpression, evaluateExpression, evaluateExpression, getBeanFactory, getEvaluationContext, getEvaluationContext, getMessageBuilderFactory, onInit, setBeanFactory, setConversionService
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getIntegrationPatternType
getThisAs
getComponentType
public void setMaxFetchSize(int maxFetchSize)
MessageSourceManagement
setMaxFetchSize
in interface MessageSourceManagement
maxFetchSize
- the max fetch size; a negative value means unlimited.public int getMaxFetchSize()
MessageSourceManagement
getMaxFetchSize
in interface MessageSourceManagement
MessageSourceManagement.setMaxFetchSize(int)
protected Object doReceive()
AbstractMessageSource
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.doReceive
in class AbstractMessageSource<T>
protected abstract Object doReceive(int maxFetchSizeToReceive)
maxFetchSizeToReceive
- the maximum number of messages to fetch if a fetch is
necessary.