Interface EsbConnectionFactoryBuilder

All Known Implementing Classes:
ArtemisConnectionFactoryBuilder, RabbitConnectionFactoryBuilder

public interface EsbConnectionFactoryBuilder
Broker-specific JMS setup for one EsbProviderType: builds the provider's ConnectionFactory, and makes the broker's flavor of sessions and queues. Each app adds only its own broker's client jar, so implementations are loaded by class name (see forProviderType): a missing client jar fails only the providers of that type, with a message naming the missing class. The broker client classes are referenced only from the implementations, never from this interface or the connection manager.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final Integer
    How long to wait for a TCP connection to a broker, in milliseconds.
  • Method Summary

    Modifier and Type
    Method
    Description
    jakarta.jms.ConnectionFactory
    Build a ConnectionFactory for a provider, from its url and credentials.
    default void
    configureSession(jakarta.jms.Session session)
    Apply broker-specific settings to a newly opened session.
    default jakarta.jms.Queue
    createQueue(jakarta.jms.Session session, String brokerQueueName)
    Make a Queue for a broker-side queue name.
    default jakarta.jms.Topic
    createTopic(jakarta.jms.Session session, String brokerTopicName)
    Make a Topic for a broker-side topic name.
    forProviderType(EsbProviderType providerType, ClassLoader classLoader)
    Load the builder for a provider type, through the given class loader.
  • Field Details

    • CONNECT_TIMEOUT_MS

      static final Integer CONNECT_TIMEOUT_MS
      How long to wait for a TCP connection to a broker, in milliseconds.
  • Method Details

    • buildConnectionFactory

      jakarta.jms.ConnectionFactory buildConnectionFactory(QEsbProviderMetaData provider) throws jakarta.jms.JMSException
      Build a ConnectionFactory for a provider, from its url and credentials.
      Throws:
      jakarta.jms.JMSException
    • configureSession

      default void configureSession(jakarta.jms.Session session) throws jakarta.jms.JMSException
      Apply broker-specific settings to a newly opened session.
      Throws:
      jakarta.jms.JMSException
    • createQueue

      default jakarta.jms.Queue createQueue(jakarta.jms.Session session, String brokerQueueName) throws jakarta.jms.JMSException
      Make a Queue for a broker-side queue name.
      Throws:
      jakarta.jms.JMSException
    • createTopic

      default jakarta.jms.Topic createTopic(jakarta.jms.Session session, String brokerTopicName) throws jakarta.jms.JMSException
      Make a Topic for a broker-side topic name.
      Throws:
      jakarta.jms.JMSException
    • forProviderType

      static EsbConnectionFactoryBuilder forProviderType(EsbProviderType providerType, ClassLoader classLoader) throws QException
      Load the builder for a provider type, through the given class loader. Throws QException "Broker client for TYPE not on classpath: CLASS" if the type's client jar is missing.
      Throws:
      QException