Package com.adaptris.core.jms
Interface VendorImplementation
-
- All Superinterfaces:
ComponentLifecycleExtension
,ConnectionComparator<VendorImplementationBase>
,VendorImplementationBase
- All Known Implementing Classes:
AdvancedActiveMqImplementation
,BaseJndiImplementation
,BasicActiveMqImplementation
,CachedDestinationJndiImplementation
,StandardJndiImplementation
,UrlVendorImplementation
,VendorImplementationImp
public interface VendorImplementation extends VendorImplementationBase
Abstract factory that insulates vendor-specific code from the rest of the
com.adaptris.core.jms
package.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default javax.jms.Connection
createConnection(javax.jms.ConnectionFactory factory, JmsConnectionConfig cfg)
Create a connection based on the factory and configuration.javax.jms.ConnectionFactory
createConnectionFactory()
Returns aConnectionFactory
.-
Methods inherited from interface com.adaptris.core.ComponentLifecycleExtension
prepare
-
Methods inherited from interface com.adaptris.core.jms.ConnectionComparator
connectionEquals
-
Methods inherited from interface com.adaptris.core.jms.VendorImplementationBase
createConsumer, createDestination, createQueue, createQueueReceiver, createSession, createTopic, createTopicSubscriber, retrieveBrokerDetailsForLogging
-
-
-
-
Method Detail
-
createConnectionFactory
javax.jms.ConnectionFactory createConnectionFactory() throws javax.jms.JMSException
Returns aConnectionFactory
.- Returns:
- an instance of
ConnectionFactory
- Throws:
javax.jms.JMSException
- if any occurs
-
createConnection
default javax.jms.Connection createConnection(javax.jms.ConnectionFactory factory, JmsConnectionConfig cfg) throws java.lang.Exception
Create a connection based on the factory and configuration.If the vendor in question doesn't support the JMS 1.1 API specification (i.e. ConnectionFactory doesn't expose a
createConnection()
method, this method should be explicitly overriden by the concrete implementations to do the right thing.- Parameters:
factory
- the jms connection factory.cfg
- the connection configuration (i.e. username/password)- Returns:
- a
javax.jms.Connection
instance - Throws:
java.lang.Exception
- on exception- Implementation Note:
- the default implementation just calls
createConnection()
orcreateConnection(String,String)
depending on whether a username is configured or not; this should be appropriate for all JMS 1.1 specifications.
-
-