T - The payload type.@IntegrationManagedResource public abstract class AbstractMessageSource<T> extends AbstractExpressionEvaluator implements MessageSource<T>, IntegrationInboundManagement, NamedComponent, org.springframework.beans.factory.BeanNameAware
IntegrationManagement.ManagementOverridesEXPRESSION_PARSER, loggerMETER_PREFIX, RECEIVE_COUNTER_NAME, SEND_TIMER_NAME| Constructor and Description |
|---|
AbstractMessageSource() |
| Modifier and Type | Method and Description |
|---|---|
protected org.springframework.messaging.Message<T> |
buildMessage(java.lang.Object result) |
void |
destroy() |
protected abstract java.lang.Object |
doReceive()
Subclasses must implement this method.
|
java.lang.String |
getBeanName() |
java.lang.String |
getComponentName() |
java.lang.String |
getManagedName() |
java.lang.String |
getManagedType() |
IntegrationManagement.ManagementOverrides |
getOverrides()
Return the overrides.
|
boolean |
isLoggingEnabled()
Return whether logging is enabled.
|
org.springframework.messaging.Message<T> |
receive()
Retrieve the next available message from this source.
|
void |
registerMetricsCaptor(MetricsCaptor metricsCaptorToSet)
Inject a
MetricsCaptor |
void |
setBeanName(java.lang.String name) |
void |
setHeaderExpressions(java.util.Map<java.lang.String,org.springframework.expression.Expression> headerExpressions) |
void |
setLoggingEnabled(boolean loggingEnabled)
Enable logging or not.
|
void |
setManagedName(java.lang.String managedName) |
void |
setManagedType(java.lang.String managedType) |
afterPropertiesSet, evaluateExpression, evaluateExpression, evaluateExpression, evaluateExpression, evaluateExpression, evaluateExpression, evaluateExpression, getBeanFactory, getEvaluationContext, getEvaluationContext, getMessageBuilderFactory, onInit, setBeanFactory, setConversionServiceclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetIntegrationPatternTypegetThisAsgetComponentTypepublic void setHeaderExpressions(@Nullable
java.util.Map<java.lang.String,org.springframework.expression.Expression> headerExpressions)
public void registerMetricsCaptor(MetricsCaptor metricsCaptorToSet)
IntegrationManagementMetricsCaptorregisterMetricsCaptor in interface IntegrationManagementmetricsCaptorToSet - the captor.public void setBeanName(java.lang.String name)
setBeanName in interface org.springframework.beans.factory.BeanNameAwarepublic java.lang.String getBeanName()
getBeanName in interface NamedComponentpublic void setManagedType(java.lang.String managedType)
setManagedType in interface IntegrationManagementpublic java.lang.String getManagedType()
getManagedType in interface IntegrationManagementpublic void setManagedName(java.lang.String managedName)
setManagedName in interface IntegrationManagementpublic java.lang.String getManagedName()
getManagedName in interface IntegrationManagementpublic java.lang.String getComponentName()
getComponentName in interface NamedComponentpublic boolean isLoggingEnabled()
IntegrationManagementisLoggingEnabled in interface IntegrationManagementpublic void setLoggingEnabled(boolean loggingEnabled)
IntegrationManagementsetLoggingEnabled in interface IntegrationManagementloggingEnabled - dalse to disable.public IntegrationManagement.ManagementOverrides getOverrides()
IntegrationManagementgetOverrides in interface IntegrationManagementpublic final org.springframework.messaging.Message<T> receive()
MessageSourcenull if no message is available.receive in interface MessageSource<T>protected org.springframework.messaging.Message<T> buildMessage(java.lang.Object result)
@Nullable protected abstract java.lang.Object doReceive()
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.public void destroy()
destroy in interface org.springframework.beans.factory.DisposableBeandestroy in interface IntegrationManagement