PeerBroadcastSocket(Make "channelMap" field final)
[portal.git] / ecomp-portal-BE-os / src / main / java / org / onap / portalapp / controller / PeerBroadcastSocket.java
index 170c3ce..cbc3433 100644 (file)
@@ -3,6 +3,8 @@
  * ONAP Portal
  * ===================================================================
  * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ *
+ * Modifications Copyright (C) 2019 IBM.
  * ===================================================================
  *
  * Unless otherwise specified, all software contained herein is licensed
@@ -33,7 +35,7 @@
  *
  * ============LICENSE_END============================================
  *
- * ECOMP is a trademark and service mark of AT&T Intellectual Property.
+ * 
  */
 package org.onap.portalapp.controller;
 
@@ -55,7 +57,7 @@ public class PeerBroadcastSocket {
 
        EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(PeerBroadcastSocket.class);
 
-       public static Map<String, Object> channelMap = new Hashtable<String, Object>();
+       public final static Map<String, Object> channelMap = new Hashtable<String, Object>();
        public Map<String, String> sessionMap = new Hashtable<String, String>();
        ObjectMapper mapper = new ObjectMapper();
 
@@ -82,12 +84,12 @@ public class PeerBroadcastSocket {
                                if (to == null)
                                        return;
                                Object toSessionObj = channelMap.get(to);
-                               if (toSessionObj != null) {
+                               /*if (toSessionObj != null) {
                                        Session toSession = null;
                                        toSession = (Session) toSessionObj;
                                        toSession.getBasicRemote().sendText(message);
                                }
-
+*/
                        } catch (Exception ex) {
                                logger.error(EELFLoggerDelegate.errorLogger, "Failed to send text" + ex.getMessage());
                        }