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