Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
public connect() {
const socket = SocketFactory;
this.stompClient = Stomp.Stomp.over(socket);
this.stompClient.reconnectDelay = 5000;
this.stompClient.heartbeatIncoming = 0; // Typical value 0 - disabled
this.stompClient.heartbeatOutgoing = 20000; // Typical value 20000 - every 20 seconds
const _this = this;
this.stompClient.connect({}, function(frame) {
console.log('Connected to websocket. Now subscribing: ' + frame);
_this.stompClient.send('/middleware/endpoint/subscribe');
let group = []
_this.messageSubscription = _this.stompClient.subscribe('/topic/device/', function(response) {
_this.messageActivity();
const msg = JSON.parse(response.body);
group = _this._correlatedMessages.value[msg.correlationId];
if (group) {
/***************************************************************************************************
* APPLICATION IMPORTS
*/
import * as jQuery from 'jquery';
import * as fabric from 'fabric';
import * as StompJS from '@stomp/stompjs';
import * as SockJS from 'sockjs-client';
import * as Highcharts from '../../lib/highcharts/highcharts.src';
import * as hopscotch from 'hopscotch';
import * as EventEmitter2 from 'eventemitter2';
window['$'] = jQuery;
window['jQuery'] = jQuery;
window['fabric'] = fabric.fabric;
window['SockJS'] = SockJS;
window['Stomp'] = StompJS.Stomp;
window['hopscotch'] = hopscotch;
window['Highcharts'] = Highcharts;
window['EventEmitter2'] = EventEmitter2;
* APPLICATION IMPORTS
*/
import 'zone-blacklist.js';
import * as jQuery from 'jquery';
import * as fabric from 'fabric';
import * as StompJS from '@stomp/stompjs';
import * as SockJS from 'sockjs-client';
import * as Highcharts from '../../lib/highcharts/highcharts.src';
import * as hopscotch from 'hopscotch';
import * as EventEmitter2 from 'EventEmitter2';
window['$'] = jQuery;
window['jQuery'] = jQuery;
window['fabric'] = fabric.fabric;
window['SockJS'] = SockJS;
window['Stomp'] = StompJS.Stomp;
window['hopscotch'] = hopscotch;
window['Highcharts'] = Highcharts;
window['EventEmitter2'] = EventEmitter2;
import * as summernote from 'summernote';
window['summernote'] = summernote;
*/
import * as jQuery from 'jquery';
import * as fabric from 'fabric';
import * as StompJS from '@stomp/stompjs';
import * as SockJS from 'sockjs-client';
import * as Highcharts from '../../lib/highcharts/highcharts.src';
import * as hopscotch from 'hopscotch';
import * as EventEmitter2 from 'eventemitter2';
import * as draggablePoints from '../../lib/draggable-points/draggable-points';
import * as HighchartsExporting from '../../lib/highcharts-exporting@4.2.1';
window['$'] = jQuery;
window['jQuery'] = jQuery;
window['fabric'] = fabric.fabric;
window['SockJS'] = SockJS;
window['Stomp'] = StompJS.Stomp;
window['hopscotch'] = hopscotch;
window['Highcharts'] = Highcharts;
window['EventEmitter2'] = EventEmitter2;
import * as summernote from 'summernote';
window['summernote'] = summernote;
window['draggablePoints'] = draggablePoints;
window['HighchartsExporting'] = HighchartsExporting;