Class WmClusterMultiSendTopicPublisherImpl

    • Field Detail

      • random

        protected java.util.Random random
    • Constructor Detail

      • WmClusterMultiSendTopicPublisherImpl

        protected WmClusterMultiSendTopicPublisherImpl​(WmClusterXASessionImpl session,
                                                       WmTopicImpl destination)
                                                throws javax.jms.JMSException
        Throws:
        javax.jms.JMSException
    • Method Detail

      • publish

        public void publish​(javax.jms.Topic destination,
                            javax.jms.Message message,
                            int deliveryMode,
                            int priority,
                            long timeToLive)
                     throws javax.jms.JMSException
        Description copied from class: WmTopicPublisherImpl
        Publishes a message to a topic for an unidentified message producer, specifying delivery mode, priority and time to live.

        Typically, a message producer is assigned a topic at creation time; however, the JMS API also supports unidentified message producers, which require that the topic be supplied every time a message is published.

        Specified by:
        publish in interface javax.jms.TopicPublisher
        Overrides:
        publish in class WmTopicPublisherImpl
        Parameters:
        destination - the topic to publish this message to
        message - the message to publish
        deliveryMode - the delivery mode to use
        priority - the priority for this message
        timeToLive - the message's lifetime (in milliseconds)
        Throws:
        javax.jms.JMSException - if the JMS provider fails to publish the message due to some internal error.
        javax.jms.MessageFormatException - if an invalid message is specified.
        javax.jms.InvalidDestinationException - if a client uses this method with an invalid topic.
      • getPrimaryBrokerForMultiSend

        public int getPrimaryBrokerForMultiSend()
      • publish

        public void publish​(javax.jms.Message message)
                     throws javax.jms.JMSException
        Description copied from class: WmTopicPublisherImpl
        Publishes a message to the topic. Uses the TopicPublisher's default delivery mode, priority, and time to live.
        Specified by:
        publish in interface javax.jms.TopicPublisher
        Overrides:
        publish in class WmTopicPublisherImpl
        Parameters:
        message - the message to publish
        Throws:
        javax.jms.JMSException - if the JMS provider fails to publish the message due to some internal error.
        javax.jms.MessageFormatException - if an invalid message is specified.
        javax.jms.InvalidDestinationException - if a client uses this method with a TopicPublisher with an invalid topic.
        See Also:
        MessageProducer.getDeliveryMode(), MessageProducer.getTimeToLive(), MessageProducer.getPriority()
      • publish

        public void publish​(javax.jms.Message message,
                            int deliveryMode,
                            int priority,
                            long timeToLive)
                     throws javax.jms.JMSException
        Description copied from class: WmTopicPublisherImpl
        Publishes a message to the topic, specifying delivery mode, priority, and time to live.
        Specified by:
        publish in interface javax.jms.TopicPublisher
        Overrides:
        publish in class WmTopicPublisherImpl
        Parameters:
        message - the message to publish
        deliveryMode - the delivery mode to use
        priority - the priority for this message
        timeToLive - the message's lifetime (in milliseconds)
        Throws:
        javax.jms.JMSException - if the JMS provider fails to publish the message due to some internal error.
        javax.jms.MessageFormatException - if an invalid message is specified.
        javax.jms.InvalidDestinationException - if a client uses this method with a TopicPublisher with an invalid topic.
      • publish

        public void publish​(javax.jms.Topic topic,
                            javax.jms.Message message)
                     throws javax.jms.JMSException
        Description copied from class: WmTopicPublisherImpl
        Publishes a message to a topic for an unidentified message producer. Uses the TopicPublisher's default delivery mode, priority, and time to live.

        Typically, a message producer is assigned a topic at creation time; however, the JMS API also supports unidentified message producers, which require that the topic be supplied every time a message is published.

        Specified by:
        publish in interface javax.jms.TopicPublisher
        Overrides:
        publish in class WmTopicPublisherImpl
        Parameters:
        topic - the topic to publish this message to
        message - the message to publish
        Throws:
        javax.jms.JMSException - if the JMS provider fails to publish the message due to some internal error.
        javax.jms.MessageFormatException - if an invalid message is specified.
        javax.jms.InvalidDestinationException - if a client uses this method with an invalid topic.
        See Also:
        MessageProducer.getDeliveryMode(), MessageProducer.getTimeToLive(), MessageProducer.getPriority()