public class DefaultSubscriberImpl extends java.lang.Object implements Subscriber
Subscriber| Constructor and Description |
|---|
DefaultSubscriberImpl()
Constructor DefaultSubscriberImpl
|
DefaultSubscriberImpl(java.lang.String username,
java.lang.String password,
java.lang.String brokerList,
java.lang.Boolean loadBalancing,
java.lang.Boolean sequential,
java.lang.Boolean selectorAtBroker)
Constructor DefaultSubscriberImpl
|
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Method close
|
protected Topic |
createTopic(java.lang.String topic)
Method createTopic
|
protected void |
finalize()
Method finalize
|
boolean |
isClosed()
Method isClosed
|
void |
onException(JMSException ex)
Method onException
|
void |
open()
Method open
|
protected void |
recoverSubscriptions()
Method recoverSubscriptions
|
void |
setExceptionListener(ExceptionListener listener)
Method setExceptionListener
|
long |
subscribe(java.lang.String topic,
SubscriptionListener listener,
java.lang.String selector)
Method subscribe
|
void |
unSubscribe(long token)
Method unSubscribe
|
void |
unSubscribeAll()
Close all the opened subscriptions.
|
public DefaultSubscriberImpl()
throws MOMException
MOMExceptionpublic DefaultSubscriberImpl(java.lang.String username,
java.lang.String password,
java.lang.String brokerList,
java.lang.Boolean loadBalancing,
java.lang.Boolean sequential,
java.lang.Boolean selectorAtBroker)
throws MOMException
MOMExceptionpublic boolean isClosed()
public void setExceptionListener(ExceptionListener listener)
setExceptionListener in interface Subscriberlistener - public void close()
close in interface Subscriberpublic void onException(JMSException ex)
ex - public void open()
throws MOMException
MOMExceptionpublic long subscribe(java.lang.String topic,
SubscriptionListener listener,
java.lang.String selector)
throws JMSException,
javax.naming.NamingException
subscribe in interface Subscribertopic - listener - selector - JMSExceptionjavax.naming.NamingExceptionpublic void unSubscribe(long token)
throws JMSException
unSubscribe in interface Subscribertoken - JMSExceptionpublic void unSubscribeAll()
throws JMSException
unSubscribeAll in interface SubscriberJMSException - if JMS fails to unsubscribe due to some internal JMS error.protected Topic createTopic(java.lang.String topic)
throws JMSException,
javax.naming.NamingException
topic - JMSExceptionjavax.naming.NamingExceptionprotected void finalize()
throws java.lang.Throwable
finalize in class java.lang.Objectjava.lang.Throwableprotected void recoverSubscriptions()