Interface VendorImplementationBase

All Superinterfaces:
ComponentLifecycleExtension, ConnectionComparator<VendorImplementationBase>
All Known Subinterfaces:
VendorImplementation
All Known Implementing Classes:
AdvancedActiveMqImplementation, BaseJndiImplementation, BasicActiveMqImplementation, CachedDestinationJndiImplementation, StandardJndiImplementation, UrlVendorImplementation, VendorImplementationImp

public interface VendorImplementationBase extends ComponentLifecycleExtension, ConnectionComparator<VendorImplementationBase>
  • Method Details

    • retrieveBrokerDetailsForLogging

      String retrieveBrokerDetailsForLogging()

      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.

      Returns:
      the broker details used to create the underlying ConnectionFactory
    • createQueue

      javax.jms.Queue createQueue(String name, JmsActorConfig c) throws javax.jms.JMSException

      Create or otherwise obtain a Queue.

      Parameters:
      name - the name of the queue
      c - the Configuration
      Returns:
      a Queue object
      Throws:
      javax.jms.JMSException - if any occur
    • createTopic

      javax.jms.Topic createTopic(String name, JmsActorConfig c) throws javax.jms.JMSException

      Create or otherwise obtain a Topic.

      Parameters:
      name - the name of the topic
      c - the Configuration
      Returns:
      a Topic object
      Throws:
      javax.jms.JMSException - if any occur
    • createDestination

      JmsDestination createDestination(String destination, JmsActorConfig c) throws javax.jms.JMSException
      Create either a Topic 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:

      • jms:queue:MyQueueName
      • jms:topic:MyTopicName
      • jms:queue:MyQueueName?replyToName=StaticReplyTo
      • jms:topic:MyTopicName?replyToName=StaticReplyTo

      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 myId
      • noLocal - which corresponds to the Session.createConsumer(javax.jms.Destination, String, boolean) noLocal setting. This defaults to false, if not specified.
      Parameters:
      destination - a RFC6167 style destination.
      c - configuration
      Returns:
      a JmsDestination.
      Throws:
      javax.jms.JMSException - wrapping other exceptions.
      Since:
      3.0.4
    • createConsumer

      javax.jms.MessageConsumer createConsumer(JmsDestination dest, String msgSelector, JmsActorConfig c) throws javax.jms.JMSException
      Create a message consumer for the given destination and filter expression.

      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.

      Parameters:
      dest - the destination
      msgSelector - the message selector
      c - configuration
      Returns:
      a MessageConsumer
      Throws:
      javax.jms.JMSException - wrapping other exceptions.
      Since:
      3.0.4
    • createQueueReceiver

      javax.jms.MessageConsumer createQueueReceiver(String queue, String filter, JmsActorConfig c) throws javax.jms.JMSException
      Create or otherwise get a MessageConsumer
      Parameters:
      queue - the Queue
      filter - the filter expression if any
      c - the configuration.
      Throws:
      javax.jms.JMSException
    • createTopicSubscriber

      javax.jms.MessageConsumer createTopicSubscriber(String topic, String filter, String subscriptionID, JmsActorConfig c) throws javax.jms.JMSException
      Create or otherwise get a TopicSubscriber.
      Parameters:
      topic - the topic
      filter - the filter expression if any
      subscriptionID - the subscriptionID for durable subscribers
      c - the configuration
      Throws:
      javax.jms.JMSException
    • createSession

      javax.jms.Session createSession(javax.jms.Connection c, boolean transacted, int acknowledgeMode) throws javax.jms.JMSException
      Create or otherwise get a Session
      Parameters:
      c - the Connection
      transacted - whether or not the session is transacted
      Returns:
      acknowledgeMode the acknowledgement mode
      Throws:
      javax.jms.JMSException - if there were any JMS related exceptions