public class ACSJMSTopicPublisher extends ACSJMSProducer
AcsEventPublisher for each message to publish,
an pool of AcsEventPublisher has been introduced by means
of a HashMap.
The key of the HasMap is the name of the NC.
To make the publisher reusable for all the topics, the HashMap
is static.
The DefaultPublisherImpl instantiates an object of this class and
publishes messages passing the topic i.e. it never calls the method without topic.
In particular it calls:
- publish(Topic,Message) for Heartbeat, Category, clients
- publish(Topic topic, Message message, int deliveryMode, int priority, long timeToLive)
for Sources
For our point of view the two methods have the same functioning because we
do not use the deliveryMode, priority and timeToLive at least for now ;-)cern.cmw.mom.pubsub.impl.DefaultPublisherImpl}containerServices, destination| Constructor and Description |
|---|
ACSJMSTopicPublisher(Topic topic,
ContainerServicesBase containerServices)
Constructor
|
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
Topic |
getTopic() |
void |
publish(Message message)
Publish a message in the topic
The topic is the topic whose name has been passed in the constructor.
|
void |
publish(Message message,
int deliveryMode,
int priority,
long timeToLive) |
void |
publish(Topic topic,
Message message) |
void |
publish(Topic topic,
Message message,
int deliveryMode,
int priority,
long timeToLive) |
void |
send(Message message) |
getDeliveryMode, getDestination, getDisableMessageID, getDisableMessageTimestamp, getPriority, getTimeToLive, send, send, send, setDeliveryMode, setDisableMessageID, setDisableMessageTimestamp, setPriority, setTimeToLivepublic ACSJMSTopicPublisher(Topic topic,
ContainerServicesBase containerServices)
throws JMSException
topic - The topic to publish messages intocontainerServices - The container serviceJMSExceptionpublic Topic getTopic()
throws JMSException
JMSExceptionpublic void publish(Message message)
throws JMSException
topicName field.JMSExceptionjavax.jms.TopicPublisher#publish(javax.jms.Message)public void publish(Message message,
int deliveryMode,
int priority,
long timeToLive)
throws JMSException
JMSExceptionpublic void publish(Topic topic,
Message message)
throws JMSException
JMSExceptionpublic void publish(Topic topic,
Message message,
int deliveryMode,
int priority,
long timeToLive)
throws JMSException
JMSExceptionpublic void close()
throws JMSException
JMSExceptionpublic void send(Message message)
throws JMSException
JMSException