Class JmsOutboundChannelAdapterSpec<S extends JmsOutboundChannelAdapterSpec<S>>

java.lang.Object
org.springframework.beans.factory.config.AbstractFactoryBean<T>
org.springframework.integration.dsl.IntegrationComponentSpec<S,H>
org.springframework.integration.dsl.MessageHandlerSpec<S,JmsSendingMessageHandler>
org.springframework.integration.jms.dsl.JmsOutboundChannelAdapterSpec<S>
Type Parameters:
S - the target JmsOutboundChannelAdapterSpec implementation type.
All Implemented Interfaces:
org.springframework.beans.factory.Aware, org.springframework.beans.factory.BeanClassLoaderAware, org.springframework.beans.factory.BeanFactoryAware, org.springframework.beans.factory.DisposableBean, org.springframework.beans.factory.FactoryBean<JmsSendingMessageHandler>, org.springframework.beans.factory.InitializingBean, org.springframework.context.Lifecycle, org.springframework.context.Phased, org.springframework.context.SmartLifecycle
Direct Known Subclasses:
JmsOutboundChannelAdapterSpec.JmsOutboundChannelSpecTemplateAware

public class JmsOutboundChannelAdapterSpec<S extends JmsOutboundChannelAdapterSpec<S>> extends org.springframework.integration.dsl.MessageHandlerSpec<S,JmsSendingMessageHandler>
A MessageHandlerSpec for a JmsSendingMessageHandler.
Since:
5.0
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static class 
    A JmsTemplate-based JmsOutboundChannelAdapterSpec extension.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected final JmsTemplateSpec
     

    Fields inherited from class org.springframework.integration.dsl.IntegrationComponentSpec

    PARSER, target

    Fields inherited from class org.springframework.beans.factory.config.AbstractFactoryBean

    logger

    Fields inherited from interface org.springframework.beans.factory.FactoryBean

    OBJECT_TYPE_ATTRIBUTE

    Fields inherited from interface org.springframework.context.SmartLifecycle

    DEFAULT_PHASE
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
    protected
    JmsOutboundChannelAdapterSpec(org.springframework.jms.core.JmsTemplate jmsTemplate)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    deliveryModeExpression(String deliveryModeExpression)
    Specify a SpEL expression to evaluate a deliveryMode for JMS message to send.
    <P> S
    deliveryModeFunction(Function<org.springframework.messaging.Message<P>,?> deliveryModeFunction)
    Specify a Function to resolve a deliveryMode for JMS message to send.
    destination(jakarta.jms.Destination destination)
    Configure the destination to which this adapter will send messages.
    destination(String destination)
    Configure the name of the destination to which this adapter will send messages.
    <P> S
    destination(Function<org.springframework.messaging.Message<P>,?> destinationFunction)
    Configure a Function that will be invoked at run time to determine the destination to which a message will be sent.
    Configure a SpEL expression that will evaluate, at run time, the destination to which a message will be sent.
    extractPayload(boolean extractPayload)
     
     
    timeToLiveExpression(String timeToLiveExpression)
    Specify a SpEL expression to evaluate a timeToLive for JMS message to send.
    <P> S
    timeToLiveFunction(Function<org.springframework.messaging.Message<P>,?> timeToLiveFunction)
    Specify a Function to resolve a timeToLive for JMS message to send.

    Methods inherited from class org.springframework.integration.dsl.IntegrationComponentSpec

    _this, createInstance, destroyInstance, doGet, get, getId, getObjectType, getPhase, id, isAutoStartup, isRunning, start, stop, stop

    Methods inherited from class org.springframework.beans.factory.config.AbstractFactoryBean

    afterPropertiesSet, destroy, getBeanFactory, getBeanTypeConverter, getEarlySingletonInterfaces, getObject, isSingleton, setBeanClassLoader, setBeanFactory, setSingleton

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

  • Constructor Details

    • JmsOutboundChannelAdapterSpec

      protected JmsOutboundChannelAdapterSpec(org.springframework.jms.core.JmsTemplate jmsTemplate)
  • Method Details

    • extractPayload

      public S extractPayload(boolean extractPayload)
      Parameters:
      extractPayload - the extractPayload flag.
      Returns:
      the current JmsOutboundChannelAdapterSpec.
      See Also:
    • headerMapper

      public S headerMapper(JmsHeaderMapper headerMapper)
      Parameters:
      headerMapper - the headerMapper.
      Returns:
      the current JmsOutboundChannelAdapterSpec.
      See Also:
    • destination

      public S destination(jakarta.jms.Destination destination)
      Configure the destination to which this adapter will send messages.
      Parameters:
      destination - the destination.
      Returns:
      the current JmsOutboundChannelAdapterSpec.
      See Also:
    • destination

      public S destination(String destination)
      Configure the name of the destination to which this adapter will send messages.
      Parameters:
      destination - the destination name.
      Returns:
      the current JmsOutboundChannelAdapterSpec.
      See Also:
    • destinationExpression

      public S destinationExpression(String destination)
      Configure a SpEL expression that will evaluate, at run time, the destination to which a message will be sent.
      Parameters:
      destination - the destination name.
      Returns:
      the current JmsOutboundChannelAdapterSpec.
      See Also:
    • destination

      public <P> S destination(Function<org.springframework.messaging.Message<P>,?> destinationFunction)
      Configure a Function that will be invoked at run time to determine the destination to which a message will be sent. Typically used with a Java 8 Lambda expression:
       
       .<Foo>destination(m -> m.getPayload().getState())
       
       
      Type Parameters:
      P - the expected payload type.
      Parameters:
      destinationFunction - the destination function.
      Returns:
      the current JmsOutboundChannelAdapterSpec.
      See Also:
    • deliveryModeExpression

      public S deliveryModeExpression(String deliveryModeExpression)
      Specify a SpEL expression to evaluate a deliveryMode for JMS message to send.
      Parameters:
      deliveryModeExpression - to use
      Returns:
      the spec
      Since:
      5.1
    • deliveryModeFunction

      public <P> S deliveryModeFunction(Function<org.springframework.messaging.Message<P>,?> deliveryModeFunction)
      Specify a Function to resolve a deliveryMode for JMS message to send.
      Type Parameters:
      P - the expected payload type.
      Parameters:
      deliveryModeFunction - to use
      Returns:
      the spec
      Since:
      5.1
      See Also:
      • FunctionExpression
    • timeToLiveExpression

      public S timeToLiveExpression(String timeToLiveExpression)
      Specify a SpEL expression to evaluate a timeToLive for JMS message to send.
      Parameters:
      timeToLiveExpression - to use
      Returns:
      the spec
      Since:
      5.1
    • timeToLiveFunction

      public <P> S timeToLiveFunction(Function<org.springframework.messaging.Message<P>,?> timeToLiveFunction)
      Specify a Function to resolve a timeToLive for JMS message to send.
      Type Parameters:
      P - the expected payload type.
      Parameters:
      timeToLiveFunction - to use
      Returns:
      the spec
      Since:
      5.1
      See Also:
      • FunctionExpression