psdi.iface.jms

Class JMSTopicSubscriber



  • public class JMSTopicSubscriber
    extends JMSConsumer
    This class implements the functionality specific to a Topic Subscriber.
    • Constructor Detail

      • JMSTopicSubscriber

        public JMSTopicSubscriber(java.lang.String destinationName,
                                  java.lang.String conFactoryName,
                                  java.lang.String selector,
                                  int txMode,
                                  java.lang.String subscriptionName,
                                  java.util.Properties env)
                           throws MXException
        Parameters:
        destinationName - the JNDI name of the Destination.
        conFactoryName - the JNDI name of the ConnectionFactory.
        selector - The message selector for the MessageConsumer.
        txMode - The transaction mode for the JMS client Session.
        subscriptionName - The subscription name in case of subscribing to a Topic.
        env - The env properties to create an InitialContext.
        Throws:
        MXException
      • JMSTopicSubscriber

        public JMSTopicSubscriber(java.lang.String destinationName,
                                  java.lang.String selector,
                                  javax.jms.Session session,
                                  java.lang.String subscriptionName,
                                  java.util.Properties env)
                           throws MXException
        Parameters:
        destinationName - the JNDI name of the Destination.
        selector - The message selector for the MessageConsumer.
        session - the JMS session from which the client should be created.
        subscriptionName - The subscription name in case of subscribing to a Topic.
        env - The env properties to create an InitialContext.
        Throws:
        MXException
      • JMSTopicSubscriber

        public JMSTopicSubscriber(java.lang.String destinationName,
                                  java.lang.String conFactoryName,
                                  java.lang.String selector,
                                  int txMode,
                                  java.util.Properties env)
                           throws java.lang.Exception
        Parameters:
        destinationName - the JNDI name of the Destination.
        conFactoryName - the JNDI name of the ConnectionFactory.
        selector - The message selector for the MessageConsumer.
        txMode - The transaction mode for the JMS client Session.
        env - The env properties to create an InitialContext.
        Throws:
        java.lang.Exception
      • JMSTopicSubscriber

        public JMSTopicSubscriber(java.lang.String destinationName,
                                  java.lang.String selector,
                                  javax.jms.Session session,
                                  java.util.Properties env)
                           throws MXException
        Parameters:
        destinationName - the JNDI name of the Destination.
        selector - The message selector for the MessageConsumer.
        session - the JMS session from which the client should be created.
        env - The env properties to create an InitialContext.
        Throws:
        MXException
      • JMSTopicSubscriber

        public JMSTopicSubscriber(java.lang.String destinationName,
                                  java.lang.String conFactoryName,
                                  java.lang.String selector,
                                  int txMode,
                                  java.lang.String subscriptionName,
                                  java.util.Properties env,
                                  java.lang.String providerUserName,
                                  java.lang.String providerPassword)
                           throws MXException
        Parameters:
        destinationName - the JNDI name of the Destination.
        conFactoryName - the JNDI name of the ConnectionFactory.
        selector - The message selector for the MessageConsumer.
        txMode - The transaction mode for the JMS client Session.
        subscriptionName - The subscription name in case of subscribing to a Topic.
        env - The env properties to create an InitialContext.
        providerUserName - The provider connection user.
        providerPassword - The provider connection password.
        Throws:
        MXException
    • Method Detail

      • unsubscribe

        public void unsubscribe()
                         throws java.lang.Exception
        Unsubscribe the durable subscription subscriptionName.
        Throws:
        java.lang.Exception
      • createClientInSession

        public JMSClient createClientInSession()
                                        throws MXException
        Description copied from class: JMSClient
        Creates another JMSClient of the same type in this clients Session. This is used for making the this client and the newly created client to work off the same Session and hence be in the same JMS transaction context.
        Overrides:
        createClientInSession in class JMSConsumer
        Returns:
        the newly created JMSClient instance.
        Throws:
        MXException