public class ApplicationEventListeningMessageProducer extends ExpressionMessageProducerSupport implements org.springframework.context.event.GenericApplicationListener
ApplicationListener and
passes Spring ApplicationEvents within messages.
If a payloadExpression is provided, it will be evaluated against
the ApplicationEvent instance to create the Message payload. Otherwise, the event itself will be the payload.ApplicationEventMulticaster,
ExpressionMessageProducerSupportlifecycleCondition, lifecycleLockEXPRESSION_PARSER, logger| Constructor and Description |
|---|
ApplicationEventListeningMessageProducer() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
doStart()
Takes no action by default.
|
protected void |
doStop()
Takes no action by default.
|
java.lang.String |
getComponentType()
Subclasses may implement this method to provide component type information.
|
int |
getOrder() |
void |
onApplicationEvent(org.springframework.context.ApplicationEvent event) |
protected void |
onInit()
Subclasses may implement this for initialization logic.
|
void |
setEventTypes(java.lang.Class<?>... eventTypes)
Set the list of event types (classes that extend ApplicationEvent) that
this adapter should send to the message channel.
|
boolean |
supportsEventType(org.springframework.core.ResolvableType eventType) |
boolean |
supportsSourceType(java.lang.Class<?> sourceType) |
evaluatePayloadExpression, setIntegrationEvaluationContext, setPayloadExpression, setPayloadExpressionStringafterSingletonsInstantiated, buildErrorMessage, getErrorChannel, getErrorMessageAttributes, getMessagingTemplate, getOutputChannel, sendErrorMessageIfNecessary, sendMessage, setErrorChannel, setErrorChannelName, setErrorMessageStrategy, setOutputChannel, setOutputChannelName, setSendTimeout, setShouldTrackdestroy, doStop, getPhase, getRole, isAutoStartup, isRunning, setAutoStartup, setPhase, setRole, setTaskScheduler, start, stop, stopafterPropertiesSet, extractTypeIfPossible, getApplicationContext, getApplicationContextId, getBeanFactory, getChannelResolver, getComponentName, getConversionService, getExpression, getIntegrationProperties, getIntegrationProperty, getMessageBuilderFactory, getTaskScheduler, isInitialized, setApplicationContext, setBeanFactory, setBeanName, setChannelResolver, setComponentName, setConversionService, setMessageBuilderFactory, setPrimaryExpression, toStringclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetComponentNamepublic ApplicationEventListeningMessageProducer()
public final void setEventTypes(java.lang.Class<?>... eventTypes)
ApplicationListener
with the ApplicationEventMulticaster which clears the listener cache. The cache will be
refreshed on the next appropriate ApplicationEvent.eventTypes - The event types.ApplicationEventMulticaster.addApplicationListener(org.springframework.context.ApplicationListener<?>),
supportsEventType(org.springframework.core.ResolvableType)public java.lang.String getComponentType()
IntegrationObjectSupportgetComponentType in interface NamedComponentgetComponentType in class IntegrationObjectSupportprotected void onInit()
IntegrationObjectSupportonInit in class ExpressionMessageProducerSupportpublic void onApplicationEvent(org.springframework.context.ApplicationEvent event)
onApplicationEvent in interface org.springframework.context.ApplicationListener<org.springframework.context.ApplicationEvent>public boolean supportsEventType(org.springframework.core.ResolvableType eventType)
supportsEventType in interface org.springframework.context.event.GenericApplicationListenerpublic boolean supportsSourceType(java.lang.Class<?> sourceType)
supportsSourceType in interface org.springframework.context.event.GenericApplicationListenerpublic int getOrder()
getOrder in interface org.springframework.context.event.GenericApplicationListenergetOrder in interface org.springframework.core.Orderedprotected void doStart()
MessageProducerSupportdoStart in class MessageProducerSupportprotected void doStop()
MessageProducerSupportdoStop in class MessageProducerSupport