moos.ssds.jms
Class Subscriber
java.lang.Object
moos.ssds.jms.Subscriber
- public class Subscriber
- extends java.lang.Object
- Author:
- brian
To change the template for this generated type comment go to
Window>Preferences>Java>Code Generation>Code and Comments
|
Constructor Summary |
Subscriber(java.lang.String topicName,
javax.jms.MessageListener messageListener)
Constructor |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
topicname
protected java.lang.String topicname
jndiContext
protected javax.naming.Context jndiContext
topicConnectionFactory
protected javax.jms.TopicConnectionFactory topicConnectionFactory
topicSession
protected javax.jms.TopicSession topicSession
topicConnection
protected javax.jms.TopicConnection topicConnection
message
protected javax.jms.Message message
topicSubscriber
protected javax.jms.TopicSubscriber topicSubscriber
Subscriber
public Subscriber(java.lang.String topicName,
javax.jms.MessageListener messageListener)
- Constructor
- Parameters:
topicName - The name of the topic to subscribe to. For JBoss this
needs to be "topic/someTopic" whereas most other J2EE servers would
use "someTopic"messageListener - The MessageListener to be used to
handle the message.
getMessageListener
public javax.jms.MessageListener getMessageListener()
- Accessor for the MessageListener
- Returns:
- The class used to process the messages recieved by this
SubscriberComponent
getTopicname
public java.lang.String getTopicname()
- Accessor for the topic name
- Returns:
- The topic name that this
SubscriberComponent is
subscribed to.
isConnected
public boolean isConnected()
connect
public void connect()
close
public void close()
- Closes the topic connection. Should be called when the class is no longer
used.