Spring Integration

org.springframework.integration.jms
Class JmsSendingMessageHandler

java.lang.Object
  extended by org.springframework.integration.context.IntegrationObjectSupport
      extended by org.springframework.integration.jms.AbstractJmsTemplateBasedAdapter
          extended by org.springframework.integration.jms.JmsSendingMessageHandler
All Implemented Interfaces:
BeanFactoryAware, BeanNameAware, InitializingBean, Ordered, NamedComponent, MessageHandler, TrackableComponent

public class JmsSendingMessageHandler
extends AbstractJmsTemplateBasedAdapter
implements MessageHandler, TrackableComponent, Ordered

A MessageConsumer that sends the converted Message payload within a JMS Message.

Author:
Mark Fisher, Oleg Zhurakousky

Field Summary
 
Fields inherited from class org.springframework.integration.context.IntegrationObjectSupport
logger
 
Fields inherited from interface org.springframework.core.Ordered
HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE
 
Constructor Summary
JmsSendingMessageHandler()
          No-arg constructor provided for convenience when configuring with setters.
JmsSendingMessageHandler(JmsTemplate jmsTemplate)
           
 
Method Summary
 String getComponentType()
          Subclasses may implement this method to provide component type information.
 int getOrder()
           
 void handleMessage(Message<?> message)
          Handles the message if possible.
 void setOrder(int order)
           
 void setShouldTrack(boolean shouldTrack)
           
 
Methods inherited from class org.springframework.integration.jms.AbstractJmsTemplateBasedAdapter
getJmsTemplate, onInit, setConnectionFactory, setDeliveryMode, setDeliveryPersistent, setDestination, setDestinationName, setDestinationResolver, setExplicitQosEnabled, setExtractPayload, setHeaderMapper, setMessageConverter, setPriority, setPubSubDomain, setTimeToLive, shouldExtractPayload
 
Methods inherited from class org.springframework.integration.context.IntegrationObjectSupport
afterPropertiesSet, getBeanFactory, getComponentName, getConversionService, getRequiredMetadataPersister, getTaskScheduler, setBeanFactory, setBeanName, setComponentName, setConversionService, setTaskScheduler, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.springframework.integration.context.NamedComponent
getComponentName
 

Constructor Detail

JmsSendingMessageHandler

public JmsSendingMessageHandler(JmsTemplate jmsTemplate)

JmsSendingMessageHandler

public JmsSendingMessageHandler()
No-arg constructor provided for convenience when configuring with setters. Note that the initialization callback will validate.

Method Detail

setShouldTrack

public void setShouldTrack(boolean shouldTrack)
Specified by:
setShouldTrack in interface TrackableComponent

getComponentType

public String getComponentType()
Description copied from class: IntegrationObjectSupport
Subclasses may implement this method to provide component type information.

Specified by:
getComponentType in interface NamedComponent
Overrides:
getComponentType in class IntegrationObjectSupport

setOrder

public void setOrder(int order)

getOrder

public int getOrder()
Specified by:
getOrder in interface Ordered

handleMessage

public final void handleMessage(Message<?> message)
Description copied from interface: MessageHandler
Handles the message if possible. If the handler cannot deal with the message this will result in a MessageRejectedException e.g. in case of a Selective Consumer. When a consumer tries to handle a message, but fails to do so, a MessageHandlingException is thrown. In the last case it is recommended to treat the message as tainted and go into an error scenario.

When the handling results in a failure of another message being sent (e.g. a "reply" message), that failure will trigger a MessageDeliveryException.

Specified by:
handleMessage in interface MessageHandler
Parameters:
message - the message to be handled

Spring Integration

Copyright © 2010. All Rights Reserved.