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

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

List of all members.

Public Member Functions

 DefaultPublisherImpl () throws MOMException
 DefaultPublisherImpl (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 ()
BytesMessage createBytesMessage () throws JMSException
MapMessage createMapMessage () throws JMSException
Message createMessage () throws JMSException
ObjectMessage createObjectMessage () throws JMSException
StreamMessage createStreamMessage () throws JMSException
TextMessage createTextMessage () throws JMSException
void onException (JMSException ex)
void open () throws MOMException
void publish (String topic, Message message) throws JMSException, NamingException
void publish (String topic, Message message, int deliveryMode, int priority, long timeToLive) throws JMSException, NamingException

Protected Member Functions

void finalize () throws Throwable

Static Package Attributes

static Category cat = Category.getInstance(DefaultPublisherImpl.class.getName())

Private Member Functions

Topic createTopic (String topic) throws JMSException, NamingException
void initialize (boolean retry) throws MOMException

Private Attributes

Boolean loadBalancing
Boolean selectorAtBroker
Boolean sequential
cern.cmw.mom.pubsub.ExceptionListener listener = null
JMSTopicConnection connection = null
Map topicDirectory = null
Properties momProperties = null
String brokerList
String password
String username
TopicPublisher publisher = null
TopicSession session = null
boolean closed = true
int defaultPersistance
int defaultPriority
long defaultTimeToLive

Detailed Description

Implementation class.

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

Constructor & Destructor Documentation

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

Constructor DefaultPublisherImpl

Parameters:
username the user name
password the password
brokerList the coma separated broker URLs list (in the form [protocol://]hostname[:port])
loadBalancing if true, indicates that the client is willing to have a connect request re-directed to another broker within a cluster
sequential if true, the broker list will be scanned sequentially
selectorAtBroker if true, selectors will be evaluated on the broker side
Exceptions:
MOMException 

References brokerList, loadBalancing, open(), password, selectorAtBroker, sequential, and username.


Member Function Documentation

void cern::cmw::mom::pubsub::impl::DefaultPublisherImpl::close (  )  [inline]
BytesMessage cern::cmw::mom::pubsub::impl::DefaultPublisherImpl::createBytesMessage (  )  throws JMSException [inline]

Method createBytesMessage

Returns:
BytesMessage
Exceptions:
JMSException 

Implements cern::cmw::mom::pubsub::Publisher.

References closed, and session.

MapMessage cern::cmw::mom::pubsub::impl::DefaultPublisherImpl::createMapMessage (  )  throws JMSException [inline]

Method createMapMessage

Returns:
MapMessage
Exceptions:
JMSException 

Implements cern::cmw::mom::pubsub::Publisher.

References closed, and session.

Message cern::cmw::mom::pubsub::impl::DefaultPublisherImpl::createMessage (  )  throws JMSException [inline]

Method createMessage

Returns:
Message
Exceptions:
JMSException 

Implements cern::cmw::mom::pubsub::Publisher.

References closed, and session.

ObjectMessage cern::cmw::mom::pubsub::impl::DefaultPublisherImpl::createObjectMessage (  )  throws JMSException [inline]

Method createObjectMessage

Returns:
ObjectMessage
Exceptions:
JMSException 

Implements cern::cmw::mom::pubsub::Publisher.

References closed, and session.

StreamMessage cern::cmw::mom::pubsub::impl::DefaultPublisherImpl::createStreamMessage (  )  throws JMSException [inline]

Method createStreamMessage

Returns:
StreamMessage
Exceptions:
JMSException 

Implements cern::cmw::mom::pubsub::Publisher.

References closed, and session.

TextMessage cern::cmw::mom::pubsub::impl::DefaultPublisherImpl::createTextMessage (  )  throws JMSException [inline]

Method createTextMessage

Returns:
TextMessage
Exceptions:
JMSException 

Implements cern::cmw::mom::pubsub::Publisher.

References closed, and session.

Topic cern::cmw::mom::pubsub::impl::DefaultPublisherImpl::createTopic ( String  topic  )  throws JMSException, NamingException [inline, private]

Method createTopic

Parameters:
topic 
Returns:
Topic
Exceptions:
JMSException 
NamingException 

References cat, connection, cern::cmw::mom::pubsub::impl::JMSConnection::getUsername(), session, and topicDirectory.

Referenced by publish().

void cern::cmw::mom::pubsub::impl::DefaultPublisherImpl::finalize (  )  throws Throwable [inline, protected]

Method finalize

Exceptions:
Throwable 

References cat, and close().

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

Method isClosed

Returns:
Topic

References closed.

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

Method onException

Parameters:
ex 

References cat.

void cern::cmw::mom::pubsub::impl::DefaultPublisherImpl::open (  )  throws MOMException [inline]

Method open

Exceptions:
MOMException 

References cat, and initialize().

Referenced by DefaultPublisherImpl().

void cern::cmw::mom::pubsub::impl::DefaultPublisherImpl::publish ( String  topic,
Message  message,
int  deliveryMode,
int  priority,
long  timeToLive 
) throws JMSException, NamingException [inline]

Publish a message to the given topic.

Parameters:
topic The String representation of the topic
message The Message object to publish
deliveryMode The Message persistence
priority The Message priority
timeToLive The Message time to live
Exceptions:
JMSException if JMS fails to publish the message due to some internal JMS error.
NamingException if there is a violation in the namespace policy.

Implements cern::cmw::mom::pubsub::Publisher.

References cat, closed, createTopic(), and publisher.

void cern::cmw::mom::pubsub::impl::DefaultPublisherImpl::publish ( String  topic,
Message  message 
) throws JMSException, NamingException [inline]

Method publish

Parameters:
topic 
message 
Exceptions:
JMSException 
NamingException 

Implements cern::cmw::mom::pubsub::Publisher.

References defaultPersistance, defaultPriority, and defaultTimeToLive.

void cern::cmw::mom::pubsub::impl::DefaultPublisherImpl::setExceptionListener ( cern.cmw.mom.pubsub.ExceptionListener  listener  )  [inline]

Method setExceptionListener

Parameters:
listener 

References listener.


Member Data Documentation

Referenced by DefaultPublisherImpl(), and initialize().

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

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

Referenced by initialize(), and publish().

Referenced by initialize(), and publish().

Referenced by initialize(), and publish().

Referenced by setExceptionListener().

Referenced by DefaultPublisherImpl(), and initialize().

Referenced by initialize().

Referenced by DefaultPublisherImpl(), and initialize().

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

Referenced by DefaultPublisherImpl(), and initialize().

Referenced by DefaultPublisherImpl(), and initialize().

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

Referenced by DefaultPublisherImpl(), and initialize().


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

Generated by  doxygen 1.6.2