

Public Member Functions | |
| DefaultSubscriberImpl () throws MOMException | |
| DefaultSubscriberImpl (String username, String password, String brokerList, Boolean loadBalancing, Boolean sequential, Boolean selectorAtBroker) throws MOMException | |
| boolean | isClosed () |
| void | setExceptionListener (cern.cmw.mom.pubsub.ExceptionListener listener) |
| void | close () |
| void | onException (JMSException ex) |
| void | open () throws MOMException |
| long | subscribe (String topic, SubscriptionListener listener, String selector) throws JMSException, NamingException |
| void | unSubscribe (long token) throws JMSException |
| void | unSubscribeAll () throws JMSException |
Protected Member Functions | |
| Topic | createTopic (String topic) throws JMSException, NamingException |
| void | finalize () throws Throwable |
| void | recoverSubscriptions () |
Static Package Attributes | |
| static Category | cat = Category.getInstance(DefaultSubscriberImpl.class.getName()) |
Private Member Functions | |
| void | setConnectionIdentifier () |
| SubscriptionHandle | getSubscriptionHandle (long token) |
| Thread | createKeepAliveThread () |
| void | initialize (boolean retry) throws MOMException |
| void | publishKeepAliveNotifications () |
| void | publishNotification (int type, SubscriptionHandle handle) throws JMSException |
Private Attributes | |
| Boolean | loadBalancing |
| Boolean | selectorAtBroker |
| Boolean | sequential |
| cern.cmw.mom.pubsub.ExceptionListener | listener = null |
| HashMap | subscribers = null |
| JMSTopicConnection | connection = null |
| Map | topicDirectory = null |
| Message | notificationMessage = null |
| Properties | momProperties = null |
| String | brokerList |
| String | password |
| String | subscriberId = null |
| String | username |
| Thread | keepAliveThread = null |
| TopicPublisher | notificationPublisher = null |
| TopicSession | serviceSession = null |
| boolean | closed = true |
| boolean | keepAliveEnabled = false |
| boolean | notificationsEnabled = false |
| int | keepAliveInterval = 0 |
Implementation class.
| cern::cmw::mom::pubsub::impl::DefaultSubscriberImpl::DefaultSubscriberImpl | ( | ) | throws MOMException [inline] |
Constructor DefaultSubscriberImpl
| MOMException |
References brokerList, loadBalancing, open(), password, selectorAtBroker, sequential, and username.
| cern::cmw::mom::pubsub::impl::DefaultSubscriberImpl::DefaultSubscriberImpl | ( | String | username, | |
| String | password, | |||
| String | brokerList, | |||
| Boolean | loadBalancing, | |||
| Boolean | sequential, | |||
| Boolean | selectorAtBroker | |||
| ) | throws MOMException [inline] |
Constructor DefaultSubscriberImpl
| MOMException |
References brokerList, loadBalancing, open(), password, selectorAtBroker, sequential, and username.
| void cern::cmw::mom::pubsub::impl::DefaultSubscriberImpl::close | ( | ) | [inline] |
Method close
Implements cern::cmw::mom::pubsub::Subscriber.
References cat, cern::cmw::mom::pubsub::impl::JMSConnection::close(), closed, connection, cern::cmw::mom::pubsub::impl::SubscriptionHandle::getSession(), cern::cmw::mom::pubsub::impl::SubscriptionHandle::getSubscriber(), cern::cmw::mom::pubsub::impl::SubscriptionHandle::getSubscriptionTopic(), keepAliveEnabled, notificationPublisher, publishNotification(), serviceSession, cern::cmw::mom::pubsub::impl::JMSConnection::stop(), subscribers, and topicDirectory.
Referenced by finalize().
| Thread cern::cmw::mom::pubsub::impl::DefaultSubscriberImpl::createKeepAliveThread | ( | ) | [inline, private] |
Method run
References cat, keepAliveEnabled, keepAliveInterval, and publishKeepAliveNotifications().
Referenced by open().
| Topic cern::cmw::mom::pubsub::impl::DefaultSubscriberImpl::createTopic | ( | String | topic | ) | throws JMSException, NamingException [inline, protected] |
Method createTopic
| topic |
| JMSException | ||
| NamingException |
References cat, connection, cern::cmw::mom::pubsub::impl::JMSConnection::getUsername(), serviceSession, and topicDirectory.
Referenced by publishNotification(), recoverSubscriptions(), and subscribe().
| void cern::cmw::mom::pubsub::impl::DefaultSubscriberImpl::finalize | ( | ) | throws Throwable [inline, protected] |
| SubscriptionHandle cern::cmw::mom::pubsub::impl::DefaultSubscriberImpl::getSubscriptionHandle | ( | long | token | ) | [inline, private] |
Method getSubscriptionHandle
| token |
References subscribers.
| void cern::cmw::mom::pubsub::impl::DefaultSubscriberImpl::initialize | ( | boolean | retry | ) | throws MOMException [inline, private] |
Method initialize
| retry |
| MOMException |
References brokerList, cat, cern::cmw::mom::pubsub::impl::JMSConnection::connect(), connection, cern::cmw::mom::pubsub::impl::JMSTopicConnection::createTopicSession(), keepAliveInterval, loadBalancing, momProperties, notificationMessage, notificationPublisher, notificationsEnabled, password, selectorAtBroker, sequential, serviceSession, cern::cmw::mom::pubsub::impl::JMSConnection::setExceptionListener(), cern::cmw::mom::pubsub::impl::JMSConnection::start(), topicDirectory, and username.
Referenced by open().
| boolean cern::cmw::mom::pubsub::impl::DefaultSubscriberImpl::isClosed | ( | ) | [inline] |
| void cern::cmw::mom::pubsub::impl::DefaultSubscriberImpl::onException | ( | JMSException | ex | ) | [inline] |
| void cern::cmw::mom::pubsub::impl::DefaultSubscriberImpl::open | ( | ) | throws MOMException [inline] |
Method open
| MOMException |
References cat, closed, createKeepAliveThread(), initialize(), keepAliveEnabled, keepAliveInterval, keepAliveThread, notificationsEnabled, setConnectionIdentifier(), and subscribers.
Referenced by DefaultSubscriberImpl().
| void cern::cmw::mom::pubsub::impl::DefaultSubscriberImpl::publishKeepAliveNotifications | ( | ) | [inline, private] |
Method publishKeepAliveNotifications
References cat, connection, cern::cmw::mom::pubsub::impl::SubscriptionHandle::getSubscriptionTopic(), cern::cmw::mom::pubsub::impl::JMSConnection::isConnected(), publishNotification(), and subscribers.
Referenced by createKeepAliveThread().
| void cern::cmw::mom::pubsub::impl::DefaultSubscriberImpl::publishNotification | ( | int | type, | |
| SubscriptionHandle | handle | |||
| ) | throws JMSException [inline, private] |
Method publishNotification
| type | ||
| handle |
| JMSException |
References cat, createTopic(), notificationMessage, notificationPublisher, notificationsEnabled, and subscriberId.
Referenced by close(), publishKeepAliveNotifications(), recoverSubscriptions(), subscribe(), unSubscribe(), and unSubscribeAll().
| void cern::cmw::mom::pubsub::impl::DefaultSubscriberImpl::recoverSubscriptions | ( | ) | [inline, protected] |
Method recoverSubscriptions
References cat, connection, createTopic(), cern::cmw::mom::pubsub::impl::JMSTopicConnection::createTopicSession(), cern::cmw::mom::pubsub::impl::SubscriptionHandle::getSubscriptionListener(), cern::cmw::mom::pubsub::impl::SubscriptionHandle::getSubscriptionSelector(), cern::cmw::mom::pubsub::impl::SubscriptionHandle::getSubscriptionTopic(), publishNotification(), cern::cmw::mom::pubsub::impl::SubscriptionHandle::setSession(), cern::cmw::mom::pubsub::impl::SubscriptionHandle::setSubscriber(), and subscribers.
| void cern::cmw::mom::pubsub::impl::DefaultSubscriberImpl::setConnectionIdentifier | ( | ) | [inline, private] |
Method setId
References cat, connection, cern::cmw::mom::pubsub::impl::JMSConnection::getConnectId(), and subscriberId.
Referenced by open().
| void cern::cmw::mom::pubsub::impl::DefaultSubscriberImpl::setExceptionListener | ( | cern.cmw.mom.pubsub.ExceptionListener | listener | ) | [inline] |
| long cern::cmw::mom::pubsub::impl::DefaultSubscriberImpl::subscribe | ( | String | topic, | |
| SubscriptionListener | listener, | |||
| String | selector | |||
| ) | throws JMSException, NamingException [inline] |
Method subscribe
| topic | ||
| listener | ||
| selector |
| JMSException | ||
| NamingException |
Implements cern::cmw::mom::pubsub::Subscriber.
References cat, closed, connection, createTopic(), cern::cmw::mom::pubsub::impl::JMSTopicConnection::createTopicSession(), cern::cmw::mom::pubsub::impl::SubscriptionHandle::getSubscriptionToken(), listener, publishNotification(), cern::cmw::mom::pubsub::impl::SubscriptionHandle::setSession(), cern::cmw::mom::pubsub::impl::SubscriptionHandle::setSubscriber(), cern::cmw::mom::pubsub::impl::SubscriptionHandle::setSubscriptionListener(), cern::cmw::mom::pubsub::impl::SubscriptionHandle::setSubscriptionSelector(), cern::cmw::mom::pubsub::impl::SubscriptionHandle::setSubscriptionTopic(), subscriberId, and subscribers.
| void cern::cmw::mom::pubsub::impl::DefaultSubscriberImpl::unSubscribe | ( | long | token | ) | throws JMSException [inline] |
Method unSubscribe
| token |
| JMSException |
Implements cern::cmw::mom::pubsub::Subscriber.
References cat, closed, cern::cmw::mom::pubsub::impl::SubscriptionHandle::getSession(), cern::cmw::mom::pubsub::impl::SubscriptionHandle::getSubscriber(), cern::cmw::mom::pubsub::impl::SubscriptionHandle::getSubscriptionTopic(), publishNotification(), and subscribers.
| void cern::cmw::mom::pubsub::impl::DefaultSubscriberImpl::unSubscribeAll | ( | ) | throws JMSException [inline] |
Close all the opened subscriptions.
| JMSException | if JMS fails to unsubscribe due to some internal JMS error. |
Implements cern::cmw::mom::pubsub::Subscriber.
References cat, closed, cern::cmw::mom::pubsub::impl::SubscriptionHandle::getSession(), cern::cmw::mom::pubsub::impl::SubscriptionHandle::getSubscriber(), cern::cmw::mom::pubsub::impl::SubscriptionHandle::getSubscriptionTopic(), publishNotification(), and subscribers.
String cern::cmw::mom::pubsub::impl::DefaultSubscriberImpl::brokerList [private] |
Referenced by DefaultSubscriberImpl(), and initialize().
Category cern::cmw::mom::pubsub::impl::DefaultSubscriberImpl::cat = Category.getInstance(DefaultSubscriberImpl.class.getName()) [static, package] |
boolean cern::cmw::mom::pubsub::impl::DefaultSubscriberImpl::closed = true [private] |
Referenced by close(), isClosed(), open(), subscribe(), unSubscribe(), and unSubscribeAll().
Referenced by close(), createTopic(), initialize(), publishKeepAliveNotifications(), recoverSubscriptions(), setConnectionIdentifier(), and subscribe().
boolean cern::cmw::mom::pubsub::impl::DefaultSubscriberImpl::keepAliveEnabled = false [private] |
Referenced by close(), createKeepAliveThread(), and open().
int cern::cmw::mom::pubsub::impl::DefaultSubscriberImpl::keepAliveInterval = 0 [private] |
Referenced by createKeepAliveThread(), initialize(), and open().
Thread cern::cmw::mom::pubsub::impl::DefaultSubscriberImpl::keepAliveThread = null [private] |
Referenced by open().
cern.cmw.mom.pubsub.ExceptionListener cern::cmw::mom::pubsub::impl::DefaultSubscriberImpl::listener = null [private] |
Referenced by setExceptionListener(), and subscribe().
Boolean cern::cmw::mom::pubsub::impl::DefaultSubscriberImpl::loadBalancing [private] |
Referenced by DefaultSubscriberImpl(), and initialize().
Properties cern::cmw::mom::pubsub::impl::DefaultSubscriberImpl::momProperties = null [private] |
Referenced by initialize().
Message cern::cmw::mom::pubsub::impl::DefaultSubscriberImpl::notificationMessage = null [private] |
Referenced by initialize(), and publishNotification().
TopicPublisher cern::cmw::mom::pubsub::impl::DefaultSubscriberImpl::notificationPublisher = null [private] |
Referenced by close(), initialize(), and publishNotification().
boolean cern::cmw::mom::pubsub::impl::DefaultSubscriberImpl::notificationsEnabled = false [private] |
Referenced by initialize(), open(), and publishNotification().
String cern::cmw::mom::pubsub::impl::DefaultSubscriberImpl::password [private] |
Referenced by DefaultSubscriberImpl(), and initialize().
Boolean cern::cmw::mom::pubsub::impl::DefaultSubscriberImpl::selectorAtBroker [private] |
Referenced by DefaultSubscriberImpl(), and initialize().
Boolean cern::cmw::mom::pubsub::impl::DefaultSubscriberImpl::sequential [private] |
Referenced by DefaultSubscriberImpl(), and initialize().
TopicSession cern::cmw::mom::pubsub::impl::DefaultSubscriberImpl::serviceSession = null [private] |
Referenced by close(), createTopic(), and initialize().
String cern::cmw::mom::pubsub::impl::DefaultSubscriberImpl::subscriberId = null [private] |
Referenced by finalize(), publishNotification(), setConnectionIdentifier(), and subscribe().
HashMap cern::cmw::mom::pubsub::impl::DefaultSubscriberImpl::subscribers = null [private] |
Referenced by close(), getSubscriptionHandle(), open(), publishKeepAliveNotifications(), recoverSubscriptions(), subscribe(), unSubscribe(), and unSubscribeAll().
Map cern::cmw::mom::pubsub::impl::DefaultSubscriberImpl::topicDirectory = null [private] |
Referenced by close(), createTopic(), and initialize().
String cern::cmw::mom::pubsub::impl::DefaultSubscriberImpl::username [private] |
Referenced by DefaultSubscriberImpl(), and initialize().
1.6.2