Class JmsGatewaySupport

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

@Deprecated(since="7.0", forRemoval=true) public abstract class JmsGatewaySupport extends Object implements org.springframework.beans.factory.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.
     
    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, org.springframework.beans.factory.BeanInitializationException
      Deprecated, for removal: This API element is subject to removal in a future version.
      Specified by:
      afterPropertiesSet in interface org.springframework.beans.factory.InitializingBean
      Throws:
      IllegalArgumentException
      org.springframework.beans.factory.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