Issue #2545 EdexBandwidthManager check for subsription event types before sending notifications.

Added missing comma to com.raytheon.edex.plugin.text.

Change-Id: Ifc970d31d8f2db29dc5a4749967cdedad84b6162

Former-commit-id: aa8fb36fc1 [formerly f570f6fcd64a96b7c61eecdfae6a765ec643e718]
Former-commit-id: 53d4de12d9
This commit is contained in:
Brad Gonzales 2013-11-15 08:00:47 -06:00
parent 7be43c4a52
commit 490c95d010
2 changed files with 17 additions and 11 deletions

View file

@ -19,5 +19,5 @@ Export-Package: com.raytheon.edex.plugin.text,
Bundle-RequiredExecutionEnvironment: JavaSE-1.6
Import-Package: com.raytheon.uf.common.dataplugin.text,
com.raytheon.uf.common.dataplugin.text.db,
com.raytheon.uf.common.dataplugin.text.request
com.raytheon.uf.common.dataplugin.text.request,
org.apache.commons.logging

View file

@ -107,6 +107,8 @@ import com.raytheon.uf.edex.datadelivery.bandwidth.util.BandwidthUtil;
* Nov 04, 2013 2506 bgonzale Added removeBandwidthSubscriptions method.
* Added subscriptionNotificationService field.
* Send notifications.
* Nov 15, 2013 2545 bgonzale Added check for subscription events before sending
* notifications.
*
* </pre>
*
@ -323,10 +325,8 @@ public abstract class EdexBandwidthManager<T extends Time, C extends Coverage>
public void subscriptionRemoved(RemoveRegistryEvent event) {
String objectType = event.getObjectType();
if (objectType != null) {
if (DataDeliveryRegistryObjectTypes.SITE_SUBSCRIPTION
.equals(objectType)
|| DataDeliveryRegistryObjectTypes.SHARED_SUBSCRIPTION
.equals(objectType)) {
if (DataDeliveryRegistryObjectTypes.isRecurringSubscription(event
.getObjectType())) {
statusHandler
.info("Received Subscription removal notification for Subscription ["
+ event.getId() + "]");
@ -386,9 +386,12 @@ public abstract class EdexBandwidthManager<T extends Time, C extends Coverage>
+ "]");
}
}
Subscription<T, C> sub = getRegistryObjectById(subscriptionHandler,
re.getId());
sendSubscriptionNotificationEvent(re, sub);
if (DataDeliveryRegistryObjectTypes.isRecurringSubscription(re
.getObjectType())) {
Subscription<T, C> sub = getRegistryObjectById(subscriptionHandler,
re.getId());
sendSubscriptionNotificationEvent(re, sub);
}
}
/**
@ -400,9 +403,12 @@ public abstract class EdexBandwidthManager<T extends Time, C extends Coverage>
@Subscribe
@AllowConcurrentEvents
public void registryEventListener(UpdateRegistryEvent event) {
Subscription<T, C> sub = getRegistryObjectById(subscriptionHandler,
event.getId());
sendSubscriptionNotificationEvent(event, sub);
if (DataDeliveryRegistryObjectTypes.isRecurringSubscription(event
.getObjectType())) {
Subscription<T, C> sub = getRegistryObjectById(subscriptionHandler,
event.getId());
sendSubscriptionNotificationEvent(event, sub);
}
}
private void sendSubscriptionNotificationEvent(RegistryEvent event,