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
FieldsModifier and TypeFieldDescriptionstatic final IntegerHow long to wait for a TCP connection to a broker, in milliseconds. -
Method Summary
Modifier and TypeMethodDescriptionjakarta.jms.ConnectionFactorybuildConnectionFactory(QEsbProviderMetaData provider) Build a ConnectionFactory for a provider, from its url and credentials.default voidconfigureSession(jakarta.jms.Session session) Apply broker-specific settings to a newly opened session.default jakarta.jms.QueuecreateQueue(jakarta.jms.Session session, String brokerQueueName) Make a Queue for a broker-side queue name.default jakarta.jms.TopiccreateTopic(jakarta.jms.Session session, String brokerTopicName) Make a Topic for a broker-side topic name.static EsbConnectionFactoryBuilderforProviderType(EsbProviderType providerType, ClassLoader classLoader) Load the builder for a provider type, through the given class loader.
-
Field Details
-
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
-