aboutsummaryrefslogtreecommitdiffstats
path: root/sdnr/wt/devicemanager-onap/onf12/provider/src
diff options
context:
space:
mode:
authorRavi Pendurty <ravi.pendurty@highstreet-technologies.com>2021-05-25 18:57:29 +0530
committerRavi Pendurty <ravi.pendurty@highstreet-technologies.com>2021-06-14 10:22:54 +0530
commit17614362f2550c29dcd746ee2c1bc01d0df5de65 (patch)
tree97930a14a08c610efceb4aebb4f457e0cf42b2f8 /sdnr/wt/devicemanager-onap/onf12/provider/src
parentdb9f267b3930a28054e967c75db228e27663aedc (diff)
Improve Websocket notification interface
Improve websocket notification interface Issue-ID: CCSDK-3315 Signed-off-by: Ravi Pendurty <ravi.pendurty@highstreet-technologies.com> Change-Id: I0ded865adddb546ade98df4760e0a32ec964295a Signed-off-by: Ravi Pendurty <ravi.pendurty@highstreet-technologies.com>
Diffstat (limited to 'sdnr/wt/devicemanager-onap/onf12/provider/src')
-rw-r--r--sdnr/wt/devicemanager-onap/onf12/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf/ifpac/microwave/WrapperMicrowaveModelRev170324.java16
-rw-r--r--sdnr/wt/devicemanager-onap/onf12/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf/ifpac/microwave/WrapperMicrowaveModelRev180907.java4
-rw-r--r--sdnr/wt/devicemanager-onap/onf12/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf/ifpac/microwave/WrapperMicrowaveModelRev181010.java4
3 files changed, 18 insertions, 6 deletions
diff --git a/sdnr/wt/devicemanager-onap/onf12/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf/ifpac/microwave/WrapperMicrowaveModelRev170324.java b/sdnr/wt/devicemanager-onap/onf12/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf/ifpac/microwave/WrapperMicrowaveModelRev170324.java
index 6b32180d1..9ed027658 100644
--- a/sdnr/wt/devicemanager-onap/onf12/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf/ifpac/microwave/WrapperMicrowaveModelRev170324.java
+++ b/sdnr/wt/devicemanager-onap/onf12/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf/ifpac/microwave/WrapperMicrowaveModelRev170324.java
@@ -206,9 +206,11 @@ public class WrapperMicrowaveModelRev170324 implements OnfMicrowaveModel, Microw
public void onObjectCreationNotification(ObjectCreationNotification notification) {
LOG.debug("Got event of type :: {}", ObjectCreationNotification.class.getSimpleName());
if (notification != null) {
+ // Send devicemanager specific notification for database and ODLUX
microwaveModelListener.creationNotification(acessor.getNodeId(), notification.getCounter(),
notification.getTimeStamp(), Helper.nnGetUniversalId(notification.getObjectIdRef()).getValue());
- notificationService.sendNotification(notification, acessor.getNodeId().getValue(),
+ // Send model specific notification to WebSocketManager
+ notificationService.sendNotification(notification, acessor.getNodeId(),
ObjectCreationNotification.QNAME, notification.getTimeStamp());
}
}
@@ -217,9 +219,11 @@ public class WrapperMicrowaveModelRev170324 implements OnfMicrowaveModel, Microw
public void onObjectDeletionNotification(ObjectDeletionNotification notification) {
LOG.debug("Got event of type :: {}", ObjectDeletionNotification.class.getSimpleName());
if (notification != null) {
+ // Send devicemanager specific notification for database and ODLUX
microwaveModelListener.deletionNotification(acessor.getNodeId(), notification.getCounter(),
notification.getTimeStamp(), Helper.nnGetUniversalId(notification.getObjectIdRef()).getValue());
- notificationService.sendNotification(notification, acessor.getNodeId().getValue(),
+ // Send model specific notification to WebSocketManager
+ notificationService.sendNotification(notification, acessor.getNodeId(),
ObjectDeletionNotification.QNAME, notification.getTimeStamp());
}
}
@@ -231,8 +235,10 @@ public class WrapperMicrowaveModelRev170324 implements OnfMicrowaveModel, Microw
.setCounter(notification.getCounter()).setTimestamp(notification.getTimeStamp())
.setObjectId(Helper.nnGetUniversalId(notification.getObjectIdRef()).getValue())
.setAttributeName(notification.getAttributeName()).setNewValue(notification.getNewValue()).build();
+ // Send devicemanager specific notification for database and ODLUX
microwaveModelListener.eventNotification(beventlogEntity);
- notificationService.sendNotification(notification, acessor.getNodeId().getValue(),
+ // Send model specific notification to WebSocketManager
+ notificationService.sendNotification(notification, acessor.getNodeId(),
AttributeValueChangedNotification.QNAME, notification.getTimeStamp());
if (notificationQueue.isPresent()) {
notificationQueue.get().put(beventlogEntity);
@@ -249,8 +255,10 @@ public class WrapperMicrowaveModelRev170324 implements OnfMicrowaveModel, Microw
.setNodeId(this.acessor.getNodeId().getValue())
.setSeverity(mapSeverity(notification.getSeverity())).setCounter(notification.getCounter())
.build();
+ // Send devicemanager specific notification for database and ODLUX
faultService.faultNotification(faultAlarm);
- notificationService.sendNotification(notification, acessor.getNodeId().getValue(), ProblemNotification.QNAME,
+ // Send model specific notification to WebSocketManager
+ notificationService.sendNotification(notification, acessor.getNodeId(), ProblemNotification.QNAME,
notification.getTimeStamp());
}
diff --git a/sdnr/wt/devicemanager-onap/onf12/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf/ifpac/microwave/WrapperMicrowaveModelRev180907.java b/sdnr/wt/devicemanager-onap/onf12/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf/ifpac/microwave/WrapperMicrowaveModelRev180907.java
index 04d72e1fa..e564881c4 100644
--- a/sdnr/wt/devicemanager-onap/onf12/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf/ifpac/microwave/WrapperMicrowaveModelRev180907.java
+++ b/sdnr/wt/devicemanager-onap/onf12/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf/ifpac/microwave/WrapperMicrowaveModelRev180907.java
@@ -265,8 +265,10 @@ public class WrapperMicrowaveModelRev180907 implements OnfMicrowaveModel, Microw
.setNodeId(this.acessor.getNodeId().getValue())
.setSeverity(mapSeverity(notification.getSeverity())).setCounter(notification.getCounter())
.build();
+ // Send devicemanager specific notification for database and ODLUX
faultService.faultNotification(faultAlarm);
- notificationService.sendNotification(notification, acessor.getNodeId().getValue(), ProblemNotification.QNAME,
+ // Send model specific notification to WebSocketManager
+ notificationService.sendNotification(notification, acessor.getNodeId(), ProblemNotification.QNAME,
notification.getTimeStamp());
}
diff --git a/sdnr/wt/devicemanager-onap/onf12/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf/ifpac/microwave/WrapperMicrowaveModelRev181010.java b/sdnr/wt/devicemanager-onap/onf12/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf/ifpac/microwave/WrapperMicrowaveModelRev181010.java
index 623fa6220..33349ef72 100644
--- a/sdnr/wt/devicemanager-onap/onf12/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf/ifpac/microwave/WrapperMicrowaveModelRev181010.java
+++ b/sdnr/wt/devicemanager-onap/onf12/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf/ifpac/microwave/WrapperMicrowaveModelRev181010.java
@@ -260,8 +260,10 @@ public class WrapperMicrowaveModelRev181010 implements OnfMicrowaveModel, Microw
.setNodeId(this.acessor.getNodeId().getValue())
.setSeverity(mapSeverity(notification.getSeverity())).setCounter(notification.getCounter())
.build();
+ // Send devicemanager specific notification for database and ODLUX
faultService.faultNotification(faultAlarm);
- notificationService.sendNotification(notification, acessor.getNodeId().getValue(), ProblemNotification.QNAME,
+ // Send model specific notification to WebSocketManager
+ notificationService.sendNotification(notification, acessor.getNodeId(), ProblemNotification.QNAME,
notification.getTimeStamp());
}