
Public Member Functions | |
| PublisherPoolItem (String name, ContainerServicesBase contSvcs) throws AcsJException | |
| void | sendMessage (Message message) throws JMSException |
| void | close () |
| long | getLastAccessTime () |
Private Attributes | |
| SimpleSupplier | publisher |
| long | lastAccessTime |
Objects from this class associate a time to the SimpleSupplier in order to remember when the NC has been accessed the last time. In this way it is possible to implement a policy to free not used NC.
| com::cosylab::acs::jms::ACSJMSTopicPublisher::PublisherPoolItem::PublisherPoolItem | ( | String | name, | |
| ContainerServicesBase | contSvcs | |||
| ) | throws AcsJException [inline] |
Constructor
Create a PoolMenuItem building a new CorbaPublisher and updating the access time
| name | The name of the topic (i.e. of the NC) |
| AcsJException | In case of error building the CorbaPublisher |
References lastAccessTime, and publisher.
| void com::cosylab::acs::jms::ACSJMSTopicPublisher::PublisherPoolItem::close | ( | ) | [inline] |
Release the publisher
References alma::acs::nc::SimpleSupplier::disconnect(), and publisher.
Referenced by com::cosylab::acs::jms::ACSJMSTopicPublisher::close().
| long com::cosylab::acs::jms::ACSJMSTopicPublisher::PublisherPoolItem::getLastAccessTime | ( | ) | [inline] |
Return the last access time for this item.
The value returned is the number of milliseconds as returned by System.currentTimeMillis()
References lastAccessTime.
| void com::cosylab::acs::jms::ACSJMSTopicPublisher::PublisherPoolItem::sendMessage | ( | Message | message | ) | throws JMSException [inline] |
Publish a message on this publisher
| message |
References alma::acs::nc::SimpleSupplier::getChannelName(), lastAccessTime, publisher, and alma::acs::nc::SimpleSupplier::publishEvent().
Referenced by com::cosylab::acs::jms::ACSJMSTopicPublisher::publish().
The last time the publisher has been accessed
Referenced by getLastAccessTime(), PublisherPoolItem(), and sendMessage().
The publisher
Referenced by close(), PublisherPoolItem(), and sendMessage().
1.6.2