Class AbstractMessageSource<T>
java.lang.Object
org.springframework.integration.util.AbstractExpressionEvaluator
org.springframework.integration.endpoint.AbstractMessageSource<T>
- Type Parameters:
- T- The payload type.
- All Implemented Interfaces:
- Aware,- BeanFactoryAware,- BeanNameAware,- DisposableBean,- InitializingBean,- MessageSource<T>,- IntegrationPattern,- NamedComponent,- IntegrationInboundManagement,- IntegrationManagement
- Direct Known Subclasses:
- AbstractFetchLimitingMessageSource,- AbstractMongoDbMessageSource,- AmqpMessageSource,- AttributePollingMessageSource,- ByteStreamReadingMessageSource,- CharacterStreamReadingMessageSource,- ExpressionEvaluatingMessageSource,- FeedEntryMessageSource,- FileReadingMessageSource,- HazelcastDistributedSQLMessageSource,- JdbcPollingChannelAdapter,- JmsDestinationPollingSource,- JpaPollingChannelAdapter,- KafkaMessageSource,- MailReceivingMessageSource,- MBeanTreePollingMessageSource,- MessageProcessorMessageSource,- MethodInvokingMessageSource,- R2dbcMessageSource,- RedisStoreMessageSource,- ResourceRetrievingMessageSource,- ScriptExecutingMessageSource,- StoredProcPollingChannelAdapter
@IntegrationManagedResource
public abstract class AbstractMessageSource<T>
extends AbstractExpressionEvaluator
implements MessageSource<T>, IntegrationInboundManagement, NamedComponent, BeanNameAware
Abstract message source.
- Since:
- 2.0
- Author:
- Mark Fisher, Oleg Zhurakousky, Gary Russell, Artem Bilan
- 
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 TypeMethodDescriptionbuildMessage(Object result) voiddestroy()protected abstract ObjectSubclasses must implement this method.Return the overrides.booleanReturn whether logging is enabled.receive()Retrieve the next available message from this source.voidregisterMetricsCaptor(MetricsCaptor metricsCaptorToSet) Inject aMetricsCaptor.voidsetBeanName(String name) voidsetHeaderExpressions(Map<String, Expression> headerExpressions) voidsetLoggingEnabled(boolean loggingEnabled) Enable logging or not.voidsetManagedName(String managedName) voidsetManagedType(String managedType) Methods inherited from class org.springframework.integration.util.AbstractExpressionEvaluatorafterPropertiesSet, evaluateExpression, evaluateExpression, evaluateExpression, evaluateExpression, evaluateExpression, evaluateExpression, evaluateExpression, getBeanFactory, getEvaluationContext, getEvaluationContext, getMessageBuilderFactory, onInit, setBeanFactory, setConversionServiceMethods 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- 
AbstractMessageSourcepublic AbstractMessageSource()
 
- 
- 
Method Details- 
setHeaderExpressions
- 
registerMetricsCaptorDescription copied from interface:IntegrationManagementInject aMetricsCaptor. Ignored ifObservationRegistryis provided.- Specified by:
- registerMetricsCaptorin interface- IntegrationManagement
- Parameters:
- metricsCaptorToSet- the captor.
- See Also:
 
- 
setBeanName- Specified by:
- setBeanNamein interface- BeanNameAware
 
- 
getBeanName- Specified by:
- getBeanNamein interface- NamedComponent
 
- 
setManagedType- Specified by:
- setManagedTypein interface- IntegrationManagement
 
- 
getManagedType- Specified by:
- getManagedTypein interface- IntegrationManagement
 
- 
setManagedName- Specified by:
- setManagedNamein interface- IntegrationManagement
 
- 
getManagedName- Specified by:
- getManagedNamein interface- IntegrationManagement
 
- 
getComponentName- Specified by:
- getComponentNamein interface- NamedComponent
 
- 
isLoggingEnabledpublic boolean isLoggingEnabled()Description copied from interface:IntegrationManagementReturn whether logging is enabled.- Specified by:
- isLoggingEnabledin interface- IntegrationManagement
- Returns:
- true if enabled.
 
- 
setLoggingEnabledpublic void setLoggingEnabled(boolean loggingEnabled) Description copied from interface:IntegrationManagementEnable logging or not.- Specified by:
- setLoggingEnabledin interface- IntegrationManagement
- Parameters:
- loggingEnabled- false to disable.
 
- 
getOverridesDescription copied from interface:IntegrationManagementReturn the overrides.- Specified by:
- getOverridesin interface- IntegrationManagement
- Returns:
- the overrides.
 
- 
receiveDescription copied from interface:MessageSourceRetrieve the next available message from this source. Returnsnullif no message is available.- Specified by:
- receivein interface- MessageSource<T>
- Returns:
- The message or null.
 
- 
buildMessage
- 
doReceiveSubclasses 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.- Returns:
- The value returned.
 
- 
destroypublic void destroy()- Specified by:
- destroyin interface- DisposableBean
- Specified by:
- destroyin interface- IntegrationManagement
 
 
-