cern::cmw::mom::pubsub::impl::DefaultSubscriberImpl Class Reference

Inheritance diagram for cern::cmw::mom::pubsub::impl::DefaultSubscriberImpl:
Inheritance graph
[legend]
Collaboration diagram for cern::cmw::mom::pubsub::impl::DefaultSubscriberImpl:
Collaboration graph
[legend]

List of all members.

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

Detailed Description

Implementation class.

Version:
1.0 23 Jan 2001
Author:
Controls Middleware Project
See also:
Subscriber

Constructor & Destructor Documentation

cern::cmw::mom::pubsub::impl::DefaultSubscriberImpl::DefaultSubscriberImpl (  )  throws MOMException [inline]
cern::cmw::mom::pubsub::impl::DefaultSubscriberImpl::DefaultSubscriberImpl ( String  username,
String  password,
String  brokerList,
Boolean  loadBalancing,
Boolean  sequential,
Boolean  selectorAtBroker 
) throws MOMException [inline]

Member Function Documentation

void cern::cmw::mom::pubsub::impl::DefaultSubscriberImpl::close (  )  [inline]
Thread cern::cmw::mom::pubsub::impl::DefaultSubscriberImpl::createKeepAliveThread (  )  [inline, private]

Method run

Returns:
Thread the keep alive thread

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

Parameters:
topic 
Returns:
Topic the topic
Exceptions:
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]

Method finalize

Exceptions:
Throwable 

References cat, close(), and subscriberId.

SubscriptionHandle cern::cmw::mom::pubsub::impl::DefaultSubscriberImpl::getSubscriptionHandle ( long  token  )  [inline, private]

Method getSubscriptionHandle

Parameters:
token 
Returns:
SubscriptionHandle the subscription handle

References subscribers.

void cern::cmw::mom::pubsub::impl::DefaultSubscriberImpl::initialize ( boolean  retry  )  throws MOMException [inline, private]
boolean cern::cmw::mom::pubsub::impl::DefaultSubscriberImpl::isClosed (  )  [inline]

Method isClosed

Returns:
boolean true iff the subscriber instance has been closed

References closed.

void cern::cmw::mom::pubsub::impl::DefaultSubscriberImpl::onException ( JMSException  ex  )  [inline]

Method onException

Parameters:
ex 

References cat.

void cern::cmw::mom::pubsub::impl::DefaultSubscriberImpl::open (  )  throws MOMException [inline]
void cern::cmw::mom::pubsub::impl::DefaultSubscriberImpl::publishKeepAliveNotifications (  )  [inline, private]
void cern::cmw::mom::pubsub::impl::DefaultSubscriberImpl::publishNotification ( int  type,
SubscriptionHandle  handle 
) throws JMSException [inline, private]

Method publishNotification

Parameters:
type 
handle 
Exceptions:
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]
void cern::cmw::mom::pubsub::impl::DefaultSubscriberImpl::setConnectionIdentifier (  )  [inline, private]
void cern::cmw::mom::pubsub::impl::DefaultSubscriberImpl::setExceptionListener ( cern.cmw.mom.pubsub.ExceptionListener  listener  )  [inline]

Method setExceptionListener

Parameters:
listener 

References listener.

long cern::cmw::mom::pubsub::impl::DefaultSubscriberImpl::subscribe ( String  topic,
SubscriptionListener  listener,
String  selector 
) throws JMSException, NamingException [inline]
void cern::cmw::mom::pubsub::impl::DefaultSubscriberImpl::unSubscribe ( long  token  )  throws JMSException [inline]
void cern::cmw::mom::pubsub::impl::DefaultSubscriberImpl::unSubscribeAll (  )  throws JMSException [inline]

Member Data Documentation

Category cern::cmw::mom::pubsub::impl::DefaultSubscriberImpl::cat = Category.getInstance(DefaultSubscriberImpl.class.getName()) [static, package]

Referenced by close(), createKeepAliveThread(), and open().

Referenced by open().

Referenced by setExceptionListener(), and subscribe().

Referenced by initialize().

Referenced by initialize(), and publishNotification().

Referenced by close(), createTopic(), and initialize().

Referenced by close(), createTopic(), and initialize().


The documentation for this class was generated from the following file:

Generated by  doxygen 1.6.2