|
OSMQ v2.0.1 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectosmq.clients.TopicSubscriberBean
A class used by client applications to receive messages. The TopicSubscriberBean connects to a message broker and allows the client application to subscribe to topical messages and receive both publish / subscribe and point-to-point (addressed) message.
Unlike the SubscriberBean, this class uses a seperate MessageListener registered for each topic.
Constructor Summary | |
TopicSubscriberBean()
|
Method Summary | |
void |
addTopic(java.lang.String topic,
MessageListener ml)
Adds a topical listener -- one that subscribes to a named topic. |
void |
close()
|
java.lang.String |
getBrokerName()
Returns the name of the remote message broker for this session. |
java.lang.String |
getClientID()
Returns the client identifier used by this session to communicate with the message broker. |
SubscriberCountManager |
getConnectionCount()
Returns a SubscriberCountManager that accumulates message counts for all ClientSubcribers associated with this connection. |
osmq.clients.SubConnectionHandler |
getConnectionHandler()
|
MessageListener |
getDefaultMessageListener()
|
ExceptionListener |
getExceptionListener()
Return the ExceptionListener that will be notified when there is an exception due to an inability to connect with the broker, or due to an I/O or communications failure. |
java.lang.String |
getHostName()
|
int |
getPortID()
|
SubscriberCountManager |
getSessionCount()
Returns a SubscriberCountManager that accumulates message counts for this ClientSubscriber instance. |
int |
getThreadPriority()
|
int |
getTopicCount()
|
boolean |
isOpen()
Returns true if the open() method was called. |
boolean |
isPersistentTopics()
|
void |
open()
Commences sending messages to the MessageListeners that have been registered by this ClientSubscriber instance. |
void |
removeTopic(java.lang.String topic)
Terminates sending messages to the listener of a specific topic. |
void |
setBrokerName(java.lang.String broker)
Defines (overrides) the named message broker to be used for message processing (sending and receiving). |
void |
setClientID(java.lang.String id)
Sets the identity of the application as a message recipient/subscriber |
void |
setDefaultMessageListener(MessageListener listener)
Defines the listener that will be passed a Message when a one arrives that is addressed specificially to this client or contains a topic to which the client has subscribed. |
void |
setExceptionListener(ExceptionListener listener)
Sets an ExceptionListener that will be notified when there is an exception due to an inability to connect with the broker, or due to an I/O or communications failure. |
void |
setHostName(java.lang.String hostname)
Overrides the host name / IP address of the remote server; |
void |
setPersistentTopics(boolean b)
A method used to identify whether topical message subscription should persist after the ClientSubscriber has terminated. |
void |
setPortID(int port)
Overrides the port id of the remote server; |
void |
setThreadPriority(int priority)
|
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public TopicSubscriberBean()
Method Detail |
public final void addTopic(java.lang.String topic, MessageListener ml) throws java.io.IOException
NOTE The application should include no more than 1 listener for any named topic.
java.io.IOException
- if attempt to add a topic that is already addedpublic int getTopicCount()
public osmq.clients.SubConnectionHandler getConnectionHandler()
public final void removeTopic(java.lang.String topic) throws java.io.IOException
java.io.IOException
public void setExceptionListener(ExceptionListener listener)
public ExceptionListener getExceptionListener()
public final void setDefaultMessageListener(MessageListener listener)
public MessageListener getDefaultMessageListener()
public void setThreadPriority(int priority)
public int getThreadPriority()
public SubscriberCountManager getConnectionCount()
public SubscriberCountManager getSessionCount()
public void setPersistentTopics(boolean b)
public boolean isPersistentTopics()
public void close()
public boolean isOpen()
public void setClientID(java.lang.String id)
id
- a unique name identifying the client application
to the message broker.public java.lang.String getClientID()
public void setPortID(int port)
NOTE: Normally this method should NOT be called by the client application.
public int getPortID()
public void setHostName(java.lang.String hostname)
NOTE: Normally this method should NOT be called by the client application.
public java.lang.String getHostName()
public void setBrokerName(java.lang.String broker)
public java.lang.String getBrokerName()
public void open() throws java.io.IOException
java.io.IOException
|
(c) 2000 - 2003 MQue Systems All Rights Reserved |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |