Public Member Functions | |
void | setExceptionListener (ExceptionListener listener) |
void | close () |
BytesMessage | createBytesMessage () throws JMSException |
MapMessage | createMapMessage () throws JMSException |
Message | createMessage () throws JMSException |
ObjectMessage | createObjectMessage () throws JMSException |
StreamMessage | createStreamMessage () throws JMSException |
TextMessage | createTextMessage () throws JMSException |
void | publish (String topic, Message message) throws JMSException, NamingException |
void | publish (String topic, Message message, int deliveryMode, int priority, long timeToLive) throws JMSException, NamingException |
Two kinds of exception are thrown :
This example shows a simple publication of a TextMessage on a topic:
<blockquote>
try { Publisher p = PubSubFactory.publisher(); } catch (MOMException momEx) { ... } // ... try { TextMessage msg = p.createTextMessage(); msg.setText("This is the text"); p.publish("CMW.DEVICES.PowerConverter.PC1.Current", msg); // ... p.close(); } catch (JMSException jmsEx) { ... } catch (NamingException namingEx) { ... } </blockquote>
|
Close the publisher singleton instance and dealloacate any resource Implemented in cern::cmw::mom::pubsub::impl::DefaultPublisherImpl.
|
|
Create an instance of BytesMessage.
Implemented in cern::cmw::mom::pubsub::impl::DefaultPublisherImpl.
|
|
Create an instance of MapMessage.
Implemented in cern::cmw::mom::pubsub::impl::DefaultPublisherImpl.
|
|
Create an instance of Message.
Implemented in cern::cmw::mom::pubsub::impl::DefaultPublisherImpl.
|
|
Create an instance of ObjectMessage.
Implemented in cern::cmw::mom::pubsub::impl::DefaultPublisherImpl.
|
|
Create an instance of StreamMessage.
Implemented in cern::cmw::mom::pubsub::impl::DefaultPublisherImpl.
|
|
Create an instance of TextMessage.
Implemented in cern::cmw::mom::pubsub::impl::DefaultPublisherImpl.
|
|
Publish a message to the given topic.
Implemented in cern::cmw::mom::pubsub::impl::DefaultPublisherImpl.
|
|
Publish a message to the given topic.
Implemented in cern::cmw::mom::pubsub::impl::DefaultPublisherImpl.
|
|
Set the listener for exceptions handling
|