public class TopicPublisher extends MessageProducer implements jakarta.jms.TopicPublisher
jakarta.jms.TopicPublisher interface.closed, dest, sess| Constructor and Description |
|---|
TopicPublisher(TopicSession sess,
Destination topic)
Constructs a publisher.
|
| Modifier and Type | Method and Description |
|---|---|
jakarta.jms.Topic |
getTopic()
API method.
|
void |
publish(jakarta.jms.Message message)
API method.
|
void |
publish(jakarta.jms.Message message,
int deliveryMode,
int priority,
long timeToLive)
API method.
|
void |
publish(jakarta.jms.Topic topic,
jakarta.jms.Message message)
API method.
|
void |
publish(jakarta.jms.Topic topic,
jakarta.jms.Message message,
int deliveryMode,
int priority,
long timeToLive)
API method.
|
String |
toString()
Returns a string view of this receiver.
|
close, getDeliveryDelay, getDeliveryMode, getDestination, getDisableMessageID, getDisableMessageTimestamp, getPriority, getTimeToLive, send, send, send, send, send, send, send, send, setDeliveryDelay, setDeliveryMode, setDisableMessageID, setDisableMessageTimestamp, setPriority, setTimeToLiveclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitclose, getDeliveryDelay, getDeliveryMode, getDestination, getDisableMessageID, getDisableMessageTimestamp, getPriority, getTimeToLive, send, send, send, send, send, send, send, send, setDeliveryDelay, setDeliveryMode, setDisableMessageID, setDisableMessageTimestamp, setPriority, setTimeToLiveTopicPublisher(TopicSession sess, Destination topic) throws jakarta.jms.JMSException
sess - The session the publisher belongs to.topic - The topic the publisher publishs messages on.jakarta.jms.IllegalStateException - If the connection is broken.jakarta.jms.JMSException - If the creation fails for any other reason.public String toString()
public jakarta.jms.Topic getTopic()
throws jakarta.jms.JMSException
getTopic in interface jakarta.jms.TopicPublisherjakarta.jms.IllegalStateException - If the publisher is closed.jakarta.jms.JMSExceptionpublic void publish(jakarta.jms.Message message,
int deliveryMode,
int priority,
long timeToLive)
throws jakarta.jms.JMSException
publish in interface jakarta.jms.TopicPublishermessage - the message to send.deliveryMode - the delivery mode to use.priority - the priority for this message.timeToLive - the message's lifetime in milliseconds.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.public void publish(jakarta.jms.Message message)
throws jakarta.jms.JMSException
publish in interface jakarta.jms.TopicPublishermessage - the message to send.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.public void publish(jakarta.jms.Topic topic,
jakarta.jms.Message message)
throws jakarta.jms.JMSException
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.
publish in interface jakarta.jms.TopicPublishertopic - the topic to send this message to.message - the message to send.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.public void publish(jakarta.jms.Topic topic,
jakarta.jms.Message message,
int deliveryMode,
int priority,
long timeToLive)
throws jakarta.jms.JMSException
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.
publish in interface jakarta.jms.TopicPublishertopic - 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.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.Copyright © 2023 ScalAgent D.T.. All rights reserved.