Public Member Functions | |
ACSJMSTopicPublisher (Topic topic, ContainerServicesBase containerServices) throws JMSException | |
Topic | getTopic () throws JMSException |
void | publish (Message message) throws JMSException |
void | publish (Message message, int deliveryMode, int priority, long timeToLive) throws JMSException |
void | publish (Topic topic, Message message) throws JMSException |
void | publish (Topic topic, Message message, int deliveryMode, int priority, long timeToLive) throws JMSException |
void | close () throws JMSException |
void | send (Message message) throws JMSException |
Private Attributes | |
String | topicName |
Static Private Attributes | |
HashMap< String, PublisherPoolItem > | publishersPool = new HashMap<String PublisherPoolItem>() |
CorbaPublisher
for each message to publish, an pool of CorbaPublisher
has been introduced by means of a HashMap
. The key of the HasMap
is the name of the NC. To made 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, clientspublish(Topic topic, Message message, int deliveryMode, int priority, long timeToLive)
for SourcesFor 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 ;-)
|
Constructor
|
|
|
|
|
|
|
|
|
|
|
|
Publish a message in the topic
The topic is the topic whose name has been passed in the constructor. However for this implementation there is no difference when the topic has been built because all the topics are in the pool. The name of the topic built in the constructor can be accessed through the
|
|
|
|
The publishers The key is the name of the NC (i.e. the name of the topic) The value is the CorbaPublisher |
|
The name of the topic passed in the constructor |