Class AbstractJmsChannel

All Implemented Interfaces:
Aware, BeanFactoryAware, BeanNameAware, DisposableBean, InitializingBean, ApplicationContextAware, ComponentSourceAware, ExpressionCapable, IntegrationPattern, NamedComponent, IntegrationManagement, TrackableComponent, MessageChannel, InterceptableChannel
Direct Known Subclasses:
PollableJmsChannel, SubscribableJmsChannel

public abstract class AbstractJmsChannel extends AbstractMessageChannel
A base AbstractMessageChannel implementation for JMS-backed message channels.
Since:
7.0
Author:
Mark Fisher, Gary Russell, Artem Bilan, Glenn Renfro
See Also:
  • Field Details

    • jmsTemplate

      protected final JmsTemplate jmsTemplate
  • Constructor Details

    • AbstractJmsChannel

      public AbstractJmsChannel(JmsTemplate jmsTemplate)
  • Method Details

    • setHeaderMapper

      public void setHeaderMapper(JmsHeaderMapper headerMapper)
      Set the mapper for the channel.
      Parameters:
      headerMapper - the JmsHeaderMapper to use
      Since:
      5.5.22
    • getHeaderMapper

      protected JmsHeaderMapper getHeaderMapper()
      Get the mapper for the channel.
      Returns:
      headerMapper
      Since:
      5.5.22
    • doSend

      protected boolean doSend(Message<?> message, long timeout)
      Description copied from class: AbstractMessageChannel
      Subclasses must implement this method. A non-negative timeout indicates how long to wait if the channel is at capacity (if the value is 0, it must return immediately with or without success). A negative timeout value indicates that the method should block until either the message is accepted or the blocking thread is interrupted.
      Specified by:
      doSend in class AbstractMessageChannel
      Parameters:
      message - The message.
      timeout - The timeout.
      Returns:
      true if the send was successful.
    • fromJmsMessage

      protected Message<?> fromJmsMessage(Message message)