Class JmsGatewaySupport

java.lang.Object
org.springframework.jms.core.support.JmsGatewaySupport
All Implemented Interfaces:
InitializingBean

@Deprecated(since="7.0", forRemoval=true) public abstract class JmsGatewaySupport extends Object implements InitializingBean
Deprecated, for removal: This API element is subject to removal in a future version.
as of 7.0, in favor of direct injection of JmsTemplate or JmsMessagingTemplate
Convenient superclass for application classes that need JMS access.

Requires a ConnectionFactory or a JmsTemplate instance to be set. It will create its own JmsTemplate if a ConnectionFactory is passed in. A custom JmsTemplate instance can be created for a given ConnectionFactory through overriding the createJmsTemplate(ConnectionFactory) method.

Since:
1.1.1
Author:
Mark Pollack
See Also:
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected final org.apache.commons.logging.Log
    Deprecated, for removal: This API element is subject to removal in a future version.
    Logger available to subclasses.
  • Constructor Summary

    Constructors
    Constructor
    Description
    Deprecated, for removal: This API element is subject to removal in a future version.
     
  • Method Summary

    Modifier and Type
    Method
    Description
    final void
    Deprecated, for removal: This API element is subject to removal in a future version.
    Invoked by the containing BeanFactory after it has set all bean properties and satisfied BeanFactoryAware, ApplicationContextAware etc.
    protected JmsTemplate
    createJmsTemplate(jakarta.jms.ConnectionFactory connectionFactory)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Create a JmsTemplate for the given ConnectionFactory.
    final @Nullable jakarta.jms.ConnectionFactory
    Deprecated, for removal: This API element is subject to removal in a future version.
    Return the JMS ConnectionFactory used by the gateway.
    Deprecated, for removal: This API element is subject to removal in a future version.
    Return the JmsTemplate for the gateway.
    protected void
    Deprecated, for removal: This API element is subject to removal in a future version.
    Subclasses can override this for custom initialization behavior.
    final void
    setConnectionFactory(jakarta.jms.ConnectionFactory connectionFactory)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Set the JMS connection factory to be used by the gateway.
    final void
    Deprecated, for removal: This API element is subject to removal in a future version.
    Set the JmsTemplate for the gateway.

    Methods inherited from class Object

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

    • logger

      protected final org.apache.commons.logging.Log logger
      Deprecated, for removal: This API element is subject to removal in a future version.
      Logger available to subclasses.
  • Constructor Details

    • JmsGatewaySupport

      public JmsGatewaySupport()
      Deprecated, for removal: This API element is subject to removal in a future version.
  • Method Details

    • setConnectionFactory

      public final void setConnectionFactory(jakarta.jms.ConnectionFactory connectionFactory)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Set the JMS connection factory to be used by the gateway. Will automatically create a JmsTemplate for the given ConnectionFactory.
      See Also:
    • createJmsTemplate

      protected JmsTemplate createJmsTemplate(jakarta.jms.ConnectionFactory connectionFactory)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Create a JmsTemplate for the given ConnectionFactory. Only invoked if populating the gateway with a ConnectionFactory reference.

      Can be overridden in subclasses to provide a JmsTemplate instance with a different configuration.

      Parameters:
      connectionFactory - the JMS ConnectionFactory to create a JmsTemplate for
      Returns:
      the new JmsTemplate instance
      See Also:
    • getConnectionFactory

      public final @Nullable jakarta.jms.ConnectionFactory getConnectionFactory()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Return the JMS ConnectionFactory used by the gateway.
    • setJmsTemplate

      public final void setJmsTemplate(@Nullable JmsTemplate jmsTemplate)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Set the JmsTemplate for the gateway.
      See Also:
    • getJmsTemplate

      public final @Nullable JmsTemplate getJmsTemplate()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Return the JmsTemplate for the gateway.
    • afterPropertiesSet

      public final void afterPropertiesSet() throws IllegalArgumentException, BeanInitializationException
      Deprecated, for removal: This API element is subject to removal in a future version.
      Description copied from interface: InitializingBean
      Invoked by the containing BeanFactory after it has set all bean properties and satisfied BeanFactoryAware, ApplicationContextAware etc.

      This method allows the bean instance to perform validation of its overall configuration and final initialization when all bean properties have been set.

      Specified by:
      afterPropertiesSet in interface InitializingBean
      Throws:
      IllegalArgumentException
      BeanInitializationException
    • initGateway

      protected void initGateway() throws Exception
      Deprecated, for removal: This API element is subject to removal in a future version.
      Subclasses can override this for custom initialization behavior. Gets called after population of this instance's bean properties.
      Throws:
      Exception - if initialization fails