Spring Integration

org.springframework.integration.jms
Class AbstractJmsTemplateBasedAdapter

java.lang.Object
  extended by org.springframework.integration.context.IntegrationObjectSupport
      extended by org.springframework.integration.jms.AbstractJmsTemplateBasedAdapter
All Implemented Interfaces:
BeanFactoryAware, BeanNameAware, InitializingBean, NamedComponent
Direct Known Subclasses:
JmsDestinationPollingSource, JmsSendingMessageHandler

public abstract class AbstractJmsTemplateBasedAdapter
extends IntegrationObjectSupport

Base class for adapters that delegate to a JmsTemplate.

Author:
Mark Fisher, Oleg Zhurakousky

Field Summary
 
Fields inherited from class org.springframework.integration.context.IntegrationObjectSupport
logger
 
Constructor Summary
AbstractJmsTemplateBasedAdapter()
          No-arg constructor provided for convenience when configuring with setters.
AbstractJmsTemplateBasedAdapter(javax.jms.ConnectionFactory connectionFactory, javax.jms.Destination destination)
           
AbstractJmsTemplateBasedAdapter(javax.jms.ConnectionFactory connectionFactory, String destinationName)
           
AbstractJmsTemplateBasedAdapter(JmsTemplate jmsTemplate)
           
 
Method Summary
protected  void configureMessageConverter(JmsTemplate jmsTemplate)
           
protected  JmsTemplate getJmsTemplate()
           
 void onInit()
          Subclasses may implement this for initialization logic.
 void setConnectionFactory(javax.jms.ConnectionFactory connectionFactory)
           
 void setDeliveryMode(int deliveryMode)
           
 void setDeliveryPersistent(boolean deliveryPersistent)
           
 void setDestination(javax.jms.Destination destination)
           
 void setDestinationName(String destinationName)
           
 void setDestinationResolver(DestinationResolver destinationResolver)
           
 void setExplicitQosEnabled(boolean explicitQosEnabled)
           
 void setExtractPayload(boolean extractPayload)
          Specify whether the payload should be extracted from each received JMS Message to be used as the Spring Integration Message payload.
 void setHeaderMapper(JmsHeaderMapper headerMapper)
           
 void setMessageConverter(MessageConverter messageConverter)
          Provide a MessageConverter strategy to use for converting between Spring Integration Messages and JMS Messages.
 void setPriority(int priority)
           
 void setPubSubDomain(boolean pubSubDomain)
           
 void setTimeToLive(long timeToLive)
           
 
Methods inherited from class org.springframework.integration.context.IntegrationObjectSupport
afterPropertiesSet, getBeanFactory, getChannelResolver, getComponentName, getComponentType, getConversionService, getTaskScheduler, setBeanFactory, setBeanName, setChannelResolver, setComponentName, setConversionService, setTaskScheduler, toString, writeMessageHistory
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

AbstractJmsTemplateBasedAdapter

public AbstractJmsTemplateBasedAdapter(JmsTemplate jmsTemplate)

AbstractJmsTemplateBasedAdapter

public AbstractJmsTemplateBasedAdapter(javax.jms.ConnectionFactory connectionFactory,
                                       javax.jms.Destination destination)

AbstractJmsTemplateBasedAdapter

public AbstractJmsTemplateBasedAdapter(javax.jms.ConnectionFactory connectionFactory,
                                       String destinationName)

AbstractJmsTemplateBasedAdapter

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

Method Detail

setExtractPayload

public void setExtractPayload(boolean extractPayload)
Specify whether the payload should be extracted from each received JMS Message to be used as the Spring Integration Message payload.

The default value is true. To force creation of Spring Integration Messages whose payload is the actual JMS Message, set this to false.


setConnectionFactory

public void setConnectionFactory(javax.jms.ConnectionFactory connectionFactory)

setDestination

public void setDestination(javax.jms.Destination destination)

setDestinationName

public void setDestinationName(String destinationName)

setPubSubDomain

public void setPubSubDomain(boolean pubSubDomain)

setMessageConverter

public void setMessageConverter(MessageConverter messageConverter)
Provide a MessageConverter strategy to use for converting between Spring Integration Messages and JMS Messages.

The default is a DefaultMessageConverter that delegates to a SimpleMessageConverter.


setDestinationResolver

public void setDestinationResolver(DestinationResolver destinationResolver)

setHeaderMapper

public void setHeaderMapper(JmsHeaderMapper headerMapper)

setExplicitQosEnabled

public void setExplicitQosEnabled(boolean explicitQosEnabled)
See Also:
JmsTemplate.setExplicitQosEnabled(boolean)

setTimeToLive

public void setTimeToLive(long timeToLive)
See Also:
JmsTemplate.setTimeToLive(long)

setDeliveryMode

public void setDeliveryMode(int deliveryMode)
See Also:
JmsTemplate.setDeliveryMode(int)

setDeliveryPersistent

public void setDeliveryPersistent(boolean deliveryPersistent)
See Also:
JmsTemplate.setDeliveryPersistent(boolean)

setPriority

public void setPriority(int priority)
See Also:
JmsTemplate.setPriority(int)

getJmsTemplate

protected JmsTemplate getJmsTemplate()

onInit

public void onInit()
Description copied from class: IntegrationObjectSupport
Subclasses may implement this for initialization logic.

Overrides:
onInit in class IntegrationObjectSupport

configureMessageConverter

protected void configureMessageConverter(JmsTemplate jmsTemplate)

Spring Integration

Copyright © 2010. All Rights Reserved.