summaryrefslogtreecommitdiffstats
path: root/sdnr/wt/websocketmanager/provider/src/main
diff options
context:
space:
mode:
Diffstat (limited to 'sdnr/wt/websocketmanager/provider/src/main')
-rw-r--r--sdnr/wt/websocketmanager/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/websocketmanager/WebSocketManagerProvider.java11
-rw-r--r--sdnr/wt/websocketmanager/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/websocketmanager/WebSocketManagerSocket.java5
2 files changed, 6 insertions, 10 deletions
diff --git a/sdnr/wt/websocketmanager/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/websocketmanager/WebSocketManagerProvider.java b/sdnr/wt/websocketmanager/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/websocketmanager/WebSocketManagerProvider.java
index d3f49b87d..8af5cb1ee 100644
--- a/sdnr/wt/websocketmanager/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/websocketmanager/WebSocketManagerProvider.java
+++ b/sdnr/wt/websocketmanager/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/websocketmanager/WebSocketManagerProvider.java
@@ -102,14 +102,9 @@ public class WebSocketManagerProvider implements WebsocketManagerService, AutoCl
@Override
public void sendNotification(Notification notification, NodeId nodeId, QName eventType) {
-// disabled because of malfunction
-// e.g. notification type (class org.opendaylight.yang.gen.v1.urn.o.ran.sc.params.xml.ns.yang.nts.manager.rev210608.
-// OperationStatusChanged$$$eventInstantAware) and qname((urn:o-ran-sc:params:xml:ns:yang:nts:manager?
-// revision=2021-06-08)operation-status-changed) do not match. won't be sent
-// if (!assertNotificationType(notification, eventType)) {
-// LOG.warn("notification type ({}) and qname({}) do not match. won't be sent",notification.getClass(), eventType)
-// return;
-// }
+ if (!assertNotificationType(notification, eventType)) {
+ return;
+ }
this.sendNotification(notification, nodeId, eventType,
YangToolsMapperHelper.getTime(notification, Instant.now()));
}
diff --git a/sdnr/wt/websocketmanager/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/websocketmanager/WebSocketManagerSocket.java b/sdnr/wt/websocketmanager/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/websocketmanager/WebSocketManagerSocket.java
index f508c61f7..95715be39 100644
--- a/sdnr/wt/websocketmanager/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/websocketmanager/WebSocketManagerSocket.java
+++ b/sdnr/wt/websocketmanager/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/websocketmanager/WebSocketManagerSocket.java
@@ -24,6 +24,7 @@ import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Map.Entry;
+import java.util.Random;
import java.util.Set;
import java.util.concurrent.ArrayBlockingQueue;
import java.util.concurrent.ExecutionException;
@@ -78,7 +79,7 @@ public class WebSocketManagerSocket extends WebSocketAdapter {
if (message != null) {
WebSocketManagerSocket.this.session.getRemote().sendStringByFuture(message)
.get(SEND_MESSAGE_TIMEOUT_MILLIS, TimeUnit.MILLISECONDS);
- LOG.debug("message sent");
+ LOG.info("message sent");
}
} catch (ExecutionException | TimeoutException e) {
LOG.warn("problem pushing message: ", e);
@@ -150,7 +151,7 @@ public class WebSocketManagerSocket extends WebSocketAdapter {
@Override
public void onWebSocketText(String message) {
- LOG.debug("{} has sent {}", this.getRemoteAdr(), message);
+ LOG.info("{} has sent {}", this.getRemoteAdr(), message);
if (!this.manageClientRequest(message)) {
this.manageClientRequest2(message);
}