Class JmsSendingMessageHandler
java.lang.Object
org.springframework.integration.context.IntegrationObjectSupport
org.springframework.integration.handler.MessageHandlerSupport
org.springframework.integration.handler.AbstractMessageHandler
org.springframework.integration.jms.JmsSendingMessageHandler
- All Implemented Interfaces:
org.reactivestreams.Subscriber<org.springframework.messaging.Message<?>>,org.springframework.beans.factory.Aware,org.springframework.beans.factory.BeanFactoryAware,org.springframework.beans.factory.BeanNameAware,org.springframework.beans.factory.DisposableBean,org.springframework.beans.factory.InitializingBean,org.springframework.context.ApplicationContextAware,org.springframework.core.Ordered,org.springframework.integration.context.ExpressionCapable,org.springframework.integration.context.Orderable,org.springframework.integration.IntegrationPattern,org.springframework.integration.support.context.NamedComponent,org.springframework.integration.support.management.IntegrationManagement,org.springframework.integration.support.management.TrackableComponent,org.springframework.messaging.MessageHandler,reactor.core.CoreSubscriber<org.springframework.messaging.Message<?>>
public class JmsSendingMessageHandler
extends org.springframework.integration.handler.AbstractMessageHandler
A MessageConsumer that sends the converted Message payload within a JMS Message.
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.springframework.integration.support.management.IntegrationManagement
org.springframework.integration.support.management.IntegrationManagement.ManagementOverrides -
Field Summary
Fields inherited from class org.springframework.integration.context.IntegrationObjectSupport
EXPRESSION_PARSER, loggerFields inherited from interface org.springframework.integration.support.management.IntegrationManagement
METER_PREFIX, RECEIVE_COUNTER_NAME, SEND_TIMER_NAMEFields inherited from interface org.springframework.core.Ordered
HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE -
Constructor Summary
ConstructorsConstructorDescriptionJmsSendingMessageHandler(org.springframework.jms.core.JmsTemplate jmsTemplate) -
Method Summary
Modifier and TypeMethodDescriptionprotected voidhandleMessageInternal(org.springframework.messaging.Message<?> message) protected voidonInit()voidsetDeliveryModeExpression(org.springframework.expression.Expression deliveryModeExpression) Specify a SpEL expression to evaluate adeliveryModefor the JMS message to send.voidsetDeliveryModeExpressionString(String deliveryModeExpression) Specify a SpEL expression to evaluate adeliveryModefor the JMS message to send.voidsetDestination(jakarta.jms.Destination destination) voidsetDestinationExpression(org.springframework.expression.Expression destinationExpression) voidsetDestinationName(String destinationName) voidsetExtractPayload(boolean extractPayload) Specify whether the payload should be extracted from each integration Message to be used as the JMS Message body.voidsetHeaderMapper(JmsHeaderMapper headerMapper) voidsetTimeToLiveExpression(org.springframework.expression.Expression timeToLiveExpression) Specify a SpEL expression to evaluate atimeToLivefor the JMS message to send.voidsetTimeToLiveExpressionString(String timeToLiveExpression) Specify a SpEL expression to evaluate atimeToLivefor the JMS message to send.Methods inherited from class org.springframework.integration.handler.AbstractMessageHandler
handleMessage, onComplete, onError, onNext, onSubscribe, setObservationConventionMethods inherited from class org.springframework.integration.handler.MessageHandlerSupport
buildSendTimer, destroy, getIntegrationPatternType, getManagedName, getManagedType, getMetricsCaptor, getObservationRegistry, getOrder, getOverrides, isLoggingEnabled, registerMetricsCaptor, registerObservationRegistry, sendTimer, setLoggingEnabled, setManagedName, setManagedType, setOrder, setShouldTrack, shouldTrackMethods inherited from class org.springframework.integration.context.IntegrationObjectSupport
afterPropertiesSet, extractTypeIfPossible, generateId, getApplicationContext, getApplicationContextId, getBeanDescription, getBeanFactory, getBeanName, getChannelResolver, getComponentName, getConversionService, getExpression, getIntegrationProperties, getIntegrationProperty, getMessageBuilderFactory, getTaskScheduler, isInitialized, setApplicationContext, setBeanFactory, setBeanName, setChannelResolver, setComponentName, setConversionService, setMessageBuilderFactory, setPrimaryExpression, setTaskScheduler, toStringMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface reactor.core.CoreSubscriber
currentContextMethods inherited from interface org.springframework.integration.support.management.IntegrationManagement
getThisAsMethods inherited from interface org.springframework.integration.support.context.NamedComponent
getBeanName, getComponentName
-
Constructor Details
-
JmsSendingMessageHandler
public JmsSendingMessageHandler(org.springframework.jms.core.JmsTemplate jmsTemplate)
-
-
Method Details
-
setDestination
public void setDestination(jakarta.jms.Destination destination) -
setDestinationName
-
setDestinationExpression
public void setDestinationExpression(org.springframework.expression.Expression destinationExpression) -
setHeaderMapper
-
setExtractPayload
public void setExtractPayload(boolean extractPayload) Specify whether the payload should be extracted from each integration Message to be used as the JMS Message body.The default value is
true. To force passing of the full Spring Integration Message instead, set this tofalse.- Parameters:
extractPayload- true to extract the payload.
-
setDeliveryModeExpressionString
Specify a SpEL expression to evaluate adeliveryModefor the JMS message to send. This option is applied only of QoS is enabled on theJmsTemplate.- Parameters:
deliveryModeExpression- to use- Since:
- 5.1
- See Also:
-
setDeliveryModeExpression
public void setDeliveryModeExpression(org.springframework.expression.Expression deliveryModeExpression) Specify a SpEL expression to evaluate adeliveryModefor the JMS message to send. This option is applied only of QoS is enabled on theJmsTemplate.- Parameters:
deliveryModeExpression- to use- Since:
- 5.1
-
setTimeToLiveExpressionString
Specify a SpEL expression to evaluate atimeToLivefor the JMS message to send.- Parameters:
timeToLiveExpression- to use- Since:
- 5.1
- See Also:
-
setTimeToLiveExpression
public void setTimeToLiveExpression(org.springframework.expression.Expression timeToLiveExpression) Specify a SpEL expression to evaluate atimeToLivefor the JMS message to send.- Parameters:
timeToLiveExpression- to use- Since:
- 5.1
-
getComponentType
- Specified by:
getComponentTypein interfaceorg.springframework.integration.support.context.NamedComponent- Overrides:
getComponentTypein classorg.springframework.integration.handler.MessageHandlerSupport
-
onInit
protected void onInit()- Overrides:
onInitin classorg.springframework.integration.context.IntegrationObjectSupport
-
handleMessageInternal
protected void handleMessageInternal(org.springframework.messaging.Message<?> message) - Specified by:
handleMessageInternalin classorg.springframework.integration.handler.AbstractMessageHandler
-