public abstract class JMSDeliveryManager extends Object implements DeliveryManager
Modifier | Constructor and Description |
---|---|
protected |
JMSDeliveryManager()
JMSDeliveryManager constructor initialize subscription details map
|
Modifier and Type | Method and Description |
---|---|
void |
cleanUp()
Clear subscription details
|
protected abstract Properties |
getInitialContextProperties(String userName,
String password)
Return initial context property object for given username and password
|
javax.jms.TopicConnection |
getTopicConnection(String userName)
Initialize and return topic connection
|
protected abstract javax.jms.TopicConnectionFactory |
getTopicConnectionFactory(InitialContext initialContext)
Return topic connection factory for given initial context properties
|
protected abstract String |
getTopicName(String topicName)
Return formatted topic name for given topic
|
void |
initializeTenant()
Initialize tenant
|
boolean |
isDeactivated()
Getter method of deactivated flag
|
void |
publish(Message message,
String topicName,
int deliveryMode)
publish an omElement to a topic
|
void |
renewSubscription(Subscription subscription)
Renew subscription details
|
void |
setDeactivated(boolean deactivated)
Setter method of deactivated flag
|
void |
setNotificationManager(NotificationManager notificationManager)
Notification manager is used to send the notifications
|
void |
subscribe(Subscription subscription)
subscribe with the subscription details.
|
void |
unSubscribe(String id)
un-subscribe the subscription
|
protected JMSDeliveryManager()
protected abstract Properties getInitialContextProperties(String userName, String password)
userName
- usernamepassword
- passwordprotected abstract javax.jms.TopicConnectionFactory getTopicConnectionFactory(InitialContext initialContext) throws EventBrokerException
initialContext
- initial context proeprtiesEventBrokerException
protected abstract String getTopicName(String topicName)
topicName
- topic namepublic javax.jms.TopicConnection getTopicConnection(String userName) throws EventBrokerException
userName
- usernameEventBrokerException
public void subscribe(Subscription subscription) throws EventBrokerException
subscribe
in interface DeliveryManager
subscription
- subscriptionEventBrokerException
public void setNotificationManager(NotificationManager notificationManager)
setNotificationManager
in interface DeliveryManager
notificationManager
- notification manager objectpublic void publish(Message message, String topicName, int deliveryMode) throws EventBrokerException
publish
in interface DeliveryManager
message
- message objecttopicName
- topic namedeliveryMode
- delivery modeEventBrokerException
public void unSubscribe(String id) throws EventBrokerException
unSubscribe
in interface DeliveryManager
id
- subscription idEventBrokerException
public void renewSubscription(Subscription subscription) throws EventBrokerException
renewSubscription
in interface DeliveryManager
subscription
- subscriptionEventBrokerException
public void cleanUp() throws EventBrokerException
cleanUp
in interface DeliveryManager
EventBrokerException
public boolean isDeactivated()
public void setDeactivated(boolean deactivated)
deactivated
- statuspublic void initializeTenant() throws EventBrokerException
initializeTenant
in interface DeliveryManager
EventBrokerException
Copyright © 2019 WSO2. All rights reserved.