public abstract class VendorImplementationImp extends java.lang.Object implements VendorImplementation
Partial implementation with common or default behaviour.
| Modifier and Type | Field and Description |
|---|---|
protected org.slf4j.Logger |
log |
| Constructor and Description |
|---|
VendorImplementationImp() |
| Modifier and Type | Method and Description |
|---|---|
void |
applyVendorSessionProperties(javax.jms.Session s)
Empty implementation that does not apply any session properties.
|
javax.jms.MessageConsumer |
createConsumer(JmsDestination d,
java.lang.String selector,
JmsActorConfig c)
Create a message consumer for the given destination and filter expression.
|
JmsDestination |
createDestination(java.lang.String destination,
JmsActorConfig c)
Create either a
Topic or Queue based on a RFC6167 style destination. |
javax.jms.Queue |
createQueue(java.lang.String name,
JmsActorConfig c)
Create or otherwise obtain a
Queue. |
javax.jms.MessageConsumer |
createQueueReceiver(ConsumeDestination cd,
JmsActorConfig c)
Create or otherwise get a MessageConsumer
|
javax.jms.Session |
createSession(javax.jms.Connection c,
boolean transacted,
int acknowledgeMode)
Create or otherwise get a Session
|
javax.jms.Topic |
createTopic(java.lang.String name,
JmsActorConfig c)
Create or otherwise obtain a
Topic. |
javax.jms.MessageConsumer |
createTopicSubscriber(ConsumeDestination cd,
java.lang.String subscriptionId,
JmsActorConfig c)
Create or otherwise get a TopicSubscriber.
|
void |
prepare()
Prepare for initialisation.
|
java.lang.String |
retrieveBrokerDetailsForLogging()
Returns the broker details used to create the underlying
ConnectionFactory. |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitcreateConnection, createConnectionFactoryconnectionEqualspublic void prepare()
throws CoreException
ComponentLifecycleExtensionprepare in interface ComponentLifecycleExtensionCoreExceptionpublic java.lang.String retrieveBrokerDetailsForLogging()
VendorImplementationBase
Returns the broker details used to create the underlying ConnectionFactory. This is delegated to the
VendorImplementation because it may over-ride the broker details configured in JmsConnection.
retrieveBrokerDetailsForLogging in interface VendorImplementationBaseConnectionFactory#retrieveBrokerDetailsForLogging()public javax.jms.Queue createQueue(java.lang.String name,
JmsActorConfig c)
throws javax.jms.JMSException
VendorImplementationBase
Create or otherwise obtain a Queue.
createQueue in interface VendorImplementationBasename - the name of the queuec - the ConfigurationQueue objectjavax.jms.JMSException - if any occurVendorImplementationBase.createQueue(java.lang.String, JmsActorConfig)public javax.jms.Topic createTopic(java.lang.String name,
JmsActorConfig c)
throws javax.jms.JMSException
VendorImplementationBase
Create or otherwise obtain a Topic.
createTopic in interface VendorImplementationBasename - the name of the topicc - the ConfigurationTopic objectjavax.jms.JMSException - if any occurVendorImplementationBase.createTopic(java.lang.String, JmsActorConfig)public javax.jms.MessageConsumer createQueueReceiver(ConsumeDestination cd, JmsActorConfig c) throws javax.jms.JMSException
VendorImplementationBasecreateQueueReceiver in interface VendorImplementationBasecd - the consume destinationc - the Configurationjavax.jms.JMSException - if there were any JMS related exceptionspublic javax.jms.MessageConsumer createConsumer(JmsDestination d, java.lang.String selector, JmsActorConfig c) throws javax.jms.JMSException
VendorImplementationBase
If the JmsDestination.destinationType() is a
JmsDestination.DestinationType.TOPIC, and JmsDestination.subscriptionId() is
not blank, then a durable subscriber is created otherwise a standard consumer is created. Also
JmsDestination.noLocal() is passed through to the appropriate Session
methods.
createConsumer in interface VendorImplementationBased - the destinationselector - the message selectorc - configurationMessageConsumerjavax.jms.JMSException - wrapping other exceptions.public javax.jms.MessageConsumer createTopicSubscriber(ConsumeDestination cd, java.lang.String subscriptionId, JmsActorConfig c) throws javax.jms.JMSException
VendorImplementationBasecreateTopicSubscriber in interface VendorImplementationBasecd - the consume destinationsubscriptionId - A subscription ID to create a durable subscriber.c - the Configurationjavax.jms.JMSException - if there were any JMS related exceptionspublic javax.jms.Session createSession(javax.jms.Connection c,
boolean transacted,
int acknowledgeMode)
throws javax.jms.JMSException
VendorImplementationBasecreateSession in interface VendorImplementationBasec - the Connectiontransacted - whether or not the session is transactedjavax.jms.JMSException - if there were any JMS related exceptionspublic void applyVendorSessionProperties(javax.jms.Session s)
throws javax.jms.JMSException
javax.jms.JMSExceptionpublic JmsDestination createDestination(java.lang.String destination, JmsActorConfig c) throws javax.jms.JMSException
VendorImplementationBaseTopic or Queue based on a RFC6167 style destination.
While RFC6167 defines the ability to use jndi to lookup the (as part of the 'jndi' variant section); this is not supported. The standard deliveryMode, timeToLive, priority, replyToName properties are supported. If not specified, then they will be inherited from the producers configuration. For instance you could have the following destinations:
In addition to the standard deliveryMode, timeToLive, priority, replyToName, there are also some custom parameters when dealing with topics.
subscriptionId - which indicates the subscriptionId that should be used when
attaching a subscriber to a topic; jms:topic:MyTopicName?subscriptionId=myId would
return a JmsDestination.subscriptionId() of myIdnoLocal - which corresponds to the
Session.createConsumer(javax.jms.Destination, String, boolean) noLocal
setting. This defaults to false, if not specified.createDestination in interface VendorImplementationBasedestination - a RFC6167 style destination.c - configurationJmsDestination.javax.jms.JMSException - wrapping other exceptions.