Package org.ow2.joram.jakarta.jms
Class TopicPublisher
- java.lang.Object
-
- org.ow2.joram.jakarta.jms.MessageProducer
-
- org.ow2.joram.jakarta.jms.TopicPublisher
-
- All Implemented Interfaces:
jakarta.jms.MessageProducer,jakarta.jms.TopicPublisher,AutoCloseable
public class TopicPublisher extends MessageProducer implements jakarta.jms.TopicPublisher
Implements thejakarta.jms.TopicPublisherinterface.
-
-
Field Summary
-
Fields inherited from class org.ow2.joram.jakarta.jms.MessageProducer
closed, dest, sess
-
-
Constructor Summary
Constructors Constructor Description TopicPublisher(TopicSession sess, Destination topic)Constructs a publisher.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description jakarta.jms.TopicgetTopic()API method.voidpublish(jakarta.jms.Message message)API method.voidpublish(jakarta.jms.Message message, int deliveryMode, int priority, long timeToLive)API method.voidpublish(jakarta.jms.Topic topic, jakarta.jms.Message message)API method.voidpublish(jakarta.jms.Topic topic, jakarta.jms.Message message, int deliveryMode, int priority, long timeToLive)API method.StringtoString()Returns a string view of this receiver.-
Methods inherited from class org.ow2.joram.jakarta.jms.MessageProducer
close, getDeliveryDelay, getDeliveryMode, getDestination, getDisableMessageID, getDisableMessageTimestamp, getPriority, getTimeToLive, send, send, send, send, send, send, send, send, setDeliveryDelay, setDeliveryMode, setDisableMessageID, setDisableMessageTimestamp, setPriority, setTimeToLive
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface jakarta.jms.MessageProducer
close, getDeliveryDelay, getDeliveryMode, getDestination, getDisableMessageID, getDisableMessageTimestamp, getPriority, getTimeToLive, send, send, send, send, send, send, send, send, setDeliveryDelay, setDeliveryMode, setDisableMessageID, setDisableMessageTimestamp, setPriority, setTimeToLive
-
-
-
-
Constructor Detail
-
TopicPublisher
TopicPublisher(TopicSession sess, Destination topic) throws jakarta.jms.JMSException
Constructs a publisher.- Parameters:
sess- The session the publisher belongs to.topic- The topic the publisher publishs messages on.- Throws:
jakarta.jms.IllegalStateException- If the connection is broken.jakarta.jms.JMSException- If the creation fails for any other reason.
-
-
Method Detail
-
toString
public String toString()
Returns a string view of this receiver.
-
getTopic
public jakarta.jms.Topic getTopic() throws jakarta.jms.JMSExceptionAPI method. Gets the topic associated with this topic publisher.- Specified by:
getTopicin interfacejakarta.jms.TopicPublisher- Returns:
- this publisher's topic.
- Throws:
jakarta.jms.IllegalStateException- If the publisher is closed.jakarta.jms.JMSException
-
publish
public void publish(jakarta.jms.Message message, int deliveryMode, int priority, long timeToLive) throws jakarta.jms.JMSExceptionAPI method. Sends a message to a topic with default delivery parameters.- Specified by:
publishin interfacejakarta.jms.TopicPublisher- Parameters:
message- the message to send.deliveryMode- the delivery mode to use.priority- the priority for this message.timeToLive- the message's lifetime in milliseconds.- Throws:
jakarta.jms.IllegalStateException- If the publisher is closed, or if the connection is broken.jakarta.jms.JMSException- If the request fails for any other reason.
-
publish
public void publish(jakarta.jms.Message message) throws jakarta.jms.JMSExceptionAPI method. Sends a message to a topic with default delivery parameters.- Specified by:
publishin interfacejakarta.jms.TopicPublisher- Parameters:
message- the message to send.- Throws:
jakarta.jms.IllegalStateException- If the publisher is closed, or if the connection is broken.jakarta.jms.JMSException- If the request fails for any other reason.
-
publish
public void publish(jakarta.jms.Topic topic, jakarta.jms.Message message) throws jakarta.jms.JMSExceptionAPI method. Sends a message to a topic for an unidentified topic publisher with default delivery parameters.Typically, a topic publisher is assigned a topic at creation time; however, the JMS API also supports unidentified topic publisher, which require that the topic be supplied every time a message is sent.
- Specified by:
publishin interfacejakarta.jms.TopicPublisher- Parameters:
topic- the topic to send this message to.message- the message to send.- Throws:
jakarta.jms.IllegalStateException- If the publisher is closed, or if the connection is broken.jakarta.jms.JMSException- If the request fails for any other reason.
-
publish
public void publish(jakarta.jms.Topic topic, jakarta.jms.Message message, int deliveryMode, int priority, long timeToLive) throws jakarta.jms.JMSExceptionAPI method. Sends a message to a topic for an unidentified topic publisher with given delivery parameters.Typically, a topic publisher is assigned a topic at creation time; however, the JMS API also supports unidentified topic publisher, which require that the topic be supplied every time a message is sent.
- Specified by:
publishin interfacejakarta.jms.TopicPublisher- Parameters:
topic- the topic to send this message to.message- the message to send.deliveryMode- the delivery mode to use.priority- the priority for this message.timeToLive- the message's lifetime in milliseconds.- Throws:
jakarta.jms.IllegalStateException- If the publisher is closed, or if the connection is broken.jakarta.jms.JMSException- If the request fails for any other reason.
-
-