diff --git a/cave/com.raytheon.uf.viz.datadelivery/src/com/raytheon/uf/viz/datadelivery/subscription/SendToServerSubscriptionNotificationService.java b/cave/com.raytheon.uf.viz.datadelivery/src/com/raytheon/uf/viz/datadelivery/subscription/SendToServerSubscriptionNotificationService.java index 8206745bcf..934ae37b54 100644 --- a/cave/com.raytheon.uf.viz.datadelivery/src/com/raytheon/uf/viz/datadelivery/subscription/SendToServerSubscriptionNotificationService.java +++ b/cave/com.raytheon.uf.viz.datadelivery/src/com/raytheon/uf/viz/datadelivery/subscription/SendToServerSubscriptionNotificationService.java @@ -26,11 +26,11 @@ import com.raytheon.uf.common.datadelivery.event.notification.PendingSubscriptio import com.raytheon.uf.common.datadelivery.event.notification.SubscriptionNotificationRequest; import com.raytheon.uf.common.datadelivery.registry.InitialPendingSubscription; import com.raytheon.uf.common.datadelivery.registry.Subscription; +import com.raytheon.uf.common.datadelivery.request.DataDeliveryConstants; +import com.raytheon.uf.common.serialization.comm.RequestRouter; import com.raytheon.uf.common.status.IUFStatusHandler; import com.raytheon.uf.common.status.UFStatus; import com.raytheon.uf.common.status.UFStatus.Priority; -import com.raytheon.uf.viz.core.exception.VizException; -import com.raytheon.uf.viz.core.requests.ThriftClient; /** * Implementation of {@link ISubscriptionNotificationService} that sends the @@ -42,7 +42,8 @@ import com.raytheon.uf.viz.core.requests.ThriftClient; * * Date Ticket# Engineer Description * ------------ ---------- ----------- -------------------------- - * Jan 4, 2013 1441 djohnson Initial creation + * Jan 04, 2013 1441 djohnson Initial creation + * Jan 17, 2013 1501 djohnson Route to datadelivery. * * * @@ -207,8 +208,7 @@ public class SendToServerSubscriptionNotificationService implements */ @Override public void sendSubscriptionActivatedNotification( - Subscription subscription, - String username) { + Subscription subscription, String username) { SubscriptionNotificationRequest req = new SubscriptionNotificationRequest(); req.setUserId(username); req.setCategory("Subscription"); @@ -223,8 +223,7 @@ public class SendToServerSubscriptionNotificationService implements */ @Override public void sendSubscriptionDeactivatedNotification( - Subscription subscription, - String username) { + Subscription subscription, String username) { SubscriptionNotificationRequest req = new SubscriptionNotificationRequest(); req.setUserId(username); req.setCategory("Subscription"); @@ -241,8 +240,9 @@ public class SendToServerSubscriptionNotificationService implements */ private void sendRequest(BaseSubscriptionNotificationRequest> req) { try { - ThriftClient.sendRequest(req); - } catch (VizException e) { + RequestRouter + .route(req, DataDeliveryConstants.DATA_DELIVERY_SERVER); + } catch (Exception e) { statusHandler.handle(Priority.PROBLEM, e.getLocalizedMessage(), e); } } diff --git a/cave/com.raytheon.uf.viz.datadelivery/src/com/raytheon/uf/viz/datadelivery/system/SystemManagementDlg.java b/cave/com.raytheon.uf.viz.datadelivery/src/com/raytheon/uf/viz/datadelivery/system/SystemManagementDlg.java index 61e2bab7e6..bd45484a53 100644 --- a/cave/com.raytheon.uf.viz.datadelivery/src/com/raytheon/uf/viz/datadelivery/system/SystemManagementDlg.java +++ b/cave/com.raytheon.uf.viz.datadelivery/src/com/raytheon/uf/viz/datadelivery/system/SystemManagementDlg.java @@ -65,6 +65,8 @@ import com.raytheon.viz.ui.presenter.IDisplay; * Oct 23, 2012 1286 djohnson Hook into bandwidth management. * Nov 20, 2012 1286 djohnson Implement IDisplay. * Jan 04, 2013 1420 mpduff Remove applying of rules. + * Jan 17, 2013 1501 djohnson Close the dialog when force apply occurs, + * and check whether changes have already been applied when OK is pressed. * * * @@ -437,21 +439,26 @@ public class SystemManagementDlg extends CaveSWTDialog implements IDisplay, sb.append("Would you like to change the bandwidth anyways?."); int response = DataDeliveryUtils.showMessage(getShell(), SWT.YES | SWT.NO, "Bandwidth Amount", sb.toString()); + boolean forceApplied = false; if (response == SWT.YES) { - boolean forceApplied = SystemRuleManager + forceApplied = SystemRuleManager .forceSetAvailableBandwidth(Network.OPSNET, bandwidth); - if (!forceApplied) { + if (forceApplied) { + availableBandwidthModified = false; + } else { statusHandler .handle(Priority.ERROR, "Bandwidth Change", "Unable to change the bandwidth for network " + Network.OPSNET + ". Please check the server for details."); - return false; + } } - return false; + return forceApplied; + } else { + availableBandwidthModified = false; } } diff --git a/edexOsgi/com.raytheon.uf.common.datadelivery.event/META-INF/MANIFEST.MF b/edexOsgi/com.raytheon.uf.common.datadelivery.event/META-INF/MANIFEST.MF index 772a6e8dbc..2ffd2f8400 100644 --- a/edexOsgi/com.raytheon.uf.common.datadelivery.event/META-INF/MANIFEST.MF +++ b/edexOsgi/com.raytheon.uf.common.datadelivery.event/META-INF/MANIFEST.MF @@ -17,4 +17,5 @@ Require-Bundle: javax.persistence;bundle-version="1.0.0", com.raytheon.uf.common.event;bundle-version="1.0.0", com.raytheon.uf.common.serialization.comm;bundle-version="1.12.1174", com.raytheon.uf.common.time;bundle-version="1.12.1174", - com.raytheon.uf.common.stats;bundle-version="1.0.0" + com.raytheon.uf.common.stats;bundle-version="1.0.0", + com.raytheon.uf.common.registry.ebxml;bundle-version="1.0.0" diff --git a/edexOsgi/com.raytheon.uf.common.datadelivery.event/src/com/raytheon/uf/common/datadelivery/event/notification/BaseSubscriptionNotificationResponse.java b/edexOsgi/com.raytheon.uf.common.datadelivery.event/src/com/raytheon/uf/common/datadelivery/event/notification/BaseSubscriptionNotificationResponse.java index bdc515c04a..567f1da440 100644 --- a/edexOsgi/com.raytheon.uf.common.datadelivery.event/src/com/raytheon/uf/common/datadelivery/event/notification/BaseSubscriptionNotificationResponse.java +++ b/edexOsgi/com.raytheon.uf.common.datadelivery.event/src/com/raytheon/uf/common/datadelivery/event/notification/BaseSubscriptionNotificationResponse.java @@ -20,6 +20,7 @@ package com.raytheon.uf.common.datadelivery.event.notification; import com.raytheon.uf.common.datadelivery.registry.Subscription; +import com.raytheon.uf.common.datadelivery.registry.handlers.IBaseSubscriptionHandler; import com.raytheon.uf.common.serialization.ISerializableObject; import com.raytheon.uf.common.serialization.annotations.DynamicSerialize; import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement; @@ -27,17 +28,18 @@ import com.raytheon.uf.common.serialization.comm.IServerRequest; /** * Base abstract class for the subscription notification response. - * + * *
- * + * * SOFTWARE HISTORY - * + * * Date Ticket# Engineer Description * ------------ ---------- ----------- -------------------------- * Sep 20, 2012 1157 mpduff Initial creation - * + * Jan 17, 2013 1501 djohnson Allow a response to specify the subscription handler. + * *- * + * * @author mpduff * @version 1.0 */ @@ -85,4 +87,11 @@ public abstract class BaseSubscriptionNotificationResponse
- * + * * SOFTWARE HISTORY - * + * * Date Ticket# Engineer Description * ------------ ---------- ----------- -------------------------- * Sep 20, 2012 mpduff Initial creation - * + * Jan 17, 2013 1501 djohnson Allow a response to specify the subscription handler. + * *- * + * * @author mpduff * @version 1.0 */ @@ -42,4 +45,12 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerialize; public class PendingSubscriptionNotificationResponse extends BaseSubscriptionNotificationResponse
- * + * * SOFTWARE HISTORY - * + * * Date Ticket# Engineer Description * ------------ ---------- ----------- -------------------------- * Jun 25, 2012 mpduff Initial creation. * Aug 21, 2012 712 mpduff Add a Subscription Object. + * Jan 17, 2013 1501 djohnson Allow a response to specify the subscription handler. *- * + * * @author mpduff * @version 1.0 */ @DynamicSerialize public class SubscriptionNotificationResponse extends BaseSubscriptionNotificationResponse
- * + * * SOFTWARE HISTORY - * + * * Date Ticket# Engineer Description * ------------ ---------- ----------- -------------------------- * Jun 25, 2012 mpduff Initial creation. @@ -44,13 +45,15 @@ import com.raytheon.uf.common.status.UFStatus; * Aug 31, 2012 1128 mpduff Set priority and category from request. * Sep 06, 2012 687 mpduff Send a SubscriptionNotificationResponse object. * Sep 24, 2012 1157 mpduff Changed to use BaseSubscriptionNotificationRequest. + * Jan 17, 2013 1501 djohnson If a subscription is still in the registry, use it for the notification response. *- * + * * @author mpduff * @version 1.0 */ -public class SubscriptionNotificationHandler