@quotemedia.com/streamer 2.31.0 → 2.36.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +157 -133
- package/examples/enduser-example.html +198 -198
- package/examples/enterprise-token-example.html +177 -177
- package/examples/reconnect-example.html +278 -278
- package/examples/stomp-3rd-party-library-example.html +682 -0
- package/examples/subscription-example.html +252 -252
- package/examples/wmid-example.html +176 -176
- package/package.json +38 -38
- package/{qmci-streamer-2.31.0.js → qmci-streamer-2.36.0.js} +1782 -1411
- package/qmci-streamer-2.36.0.min.js +115 -0
- package/examples/user-access-token-example.html +0 -177
- package/qmci-streamer-2.31.0.min.js +0 -115
|
@@ -37,6 +37,15 @@ var Connection = function () {
|
|
|
37
37
|
//probably means that an unhandled loop was reached
|
|
38
38
|
this.maxReconnectsTotal = 3;
|
|
39
39
|
this.isFirstConnection = true;
|
|
40
|
+
this.atmoCodes = {
|
|
41
|
+
1000: "Normal closure; the connection successfully completed whatever purpose for which it was created.",
|
|
42
|
+
1001: "The endpoint is going away, either because of a server failure or because the browser is navigating away from the page that opened the connection.",
|
|
43
|
+
1002: "The endpoint is terminating the connection due to a protocol error.",
|
|
44
|
+
1003: "The connection is being terminated because the endpoint received data of a type it cannot accept (for example, a text-only endpoint received binary data).",
|
|
45
|
+
1004: "The endpoint is terminating the connection because a data frame was received that is too large.",
|
|
46
|
+
1005: "Unknown: no status code was provided even though one was expected.",
|
|
47
|
+
1006: "Connection was closed abnormally (that is, with no close frame being sent)."
|
|
48
|
+
};
|
|
40
49
|
}
|
|
41
50
|
|
|
42
51
|
Connection.prototype.open = function open() {
|
|
@@ -136,6 +145,7 @@ var Connection = function () {
|
|
|
136
145
|
onClose: function onClose(response) {
|
|
137
146
|
var code = response.status;
|
|
138
147
|
var reason = response.reason || response.reasonPhrase;
|
|
148
|
+
var atmosphereMessage = response.atmoMessage;
|
|
139
149
|
// For whatever reason, Atmosphere sets to 408 when unsubscribing (e.g., when refreshing the page)
|
|
140
150
|
if (code === 408 && response.state === "unsubscribe") {
|
|
141
151
|
code = 200;
|
|
@@ -143,10 +153,18 @@ var Connection = function () {
|
|
|
143
153
|
}
|
|
144
154
|
//When 501 code is sent it could mean that the server is down, therefore do not continue trying to reconnect
|
|
145
155
|
if (code === 501 || code === 401 || code === 403 || code === 452) {
|
|
146
|
-
_this.log.
|
|
156
|
+
_this.log.warn("Unable to reconnect with code: " + code + ", reason: " + reason);
|
|
147
157
|
_this.reconnect = false;
|
|
148
158
|
}
|
|
149
|
-
|
|
159
|
+
if (atmosphereMessage && atmosphereMessage.code in _this.atmoCodes) {
|
|
160
|
+
_this.log.error("Unexpected close. Code: " + atmosphereMessage.code + " Reason: " + _this.atmoCodes[atmosphereMessage.code]);
|
|
161
|
+
_this.events.fire("atmoError", events.error("Atmosphere error", {
|
|
162
|
+
reason: _this.atmoCodes[atmosphereMessage.code],
|
|
163
|
+
code: atmosphereMessage.code
|
|
164
|
+
}));
|
|
165
|
+
code = 410;
|
|
166
|
+
reason = "Gone";
|
|
167
|
+
}
|
|
150
168
|
var e = events.close({
|
|
151
169
|
url: url,
|
|
152
170
|
transport: response.transport,
|
|
@@ -164,6 +182,8 @@ var Connection = function () {
|
|
|
164
182
|
timesExceeded: response.timesExceeded,
|
|
165
183
|
maxExceeded: response.maxExceed
|
|
166
184
|
});
|
|
185
|
+
_this.reconnect = false;
|
|
186
|
+
_this.log.warn("Slow connection received, Reconnection will not be attempted.");
|
|
167
187
|
_this.log.info(e);
|
|
168
188
|
_this.events.fire("slow", e);
|
|
169
189
|
}
|
|
@@ -198,23 +218,24 @@ var Connection = function () {
|
|
|
198
218
|
}
|
|
199
219
|
this.isFirstConnection = false;
|
|
200
220
|
var currentAttempts = this.maxReconnectAttempts;
|
|
201
|
-
|
|
221
|
+
// Recursively run this until a successful open is completed
|
|
222
|
+
var reconnect = function reconnect() {
|
|
202
223
|
if (currentAttempts <= 0) {
|
|
203
224
|
_this2.reconnect = false;
|
|
204
225
|
_this2.log.error("Error while reconnecting. No attempts left.");
|
|
205
226
|
//if maxattempts was reached and no connection was open, exit.
|
|
206
227
|
_this2.maxReconnectAttempts = 0;
|
|
207
|
-
clearInterval(reopenInterval);
|
|
208
228
|
return;
|
|
209
229
|
}
|
|
210
230
|
if (_this2.isConnectionUp || !_this2.reconnect) {
|
|
211
|
-
clearInterval(reopenInterval);
|
|
212
231
|
return;
|
|
213
232
|
}
|
|
214
233
|
_this2.log.info("Attempting reconnect. Attempts left: " + currentAttempts);
|
|
215
234
|
_this2.reopen(currentAttempts);
|
|
216
235
|
currentAttempts--;
|
|
217
|
-
|
|
236
|
+
setTimeout(reconnect, 500);
|
|
237
|
+
};
|
|
238
|
+
setTimeout(reconnect, 500);
|
|
218
239
|
};
|
|
219
240
|
|
|
220
241
|
Connection.prototype.reopen = function reopen(attempt) {
|
|
@@ -254,10 +275,6 @@ var Connection = function () {
|
|
|
254
275
|
return this.socket == null;
|
|
255
276
|
};
|
|
256
277
|
|
|
257
|
-
Connection.prototype.getConnectionUp = function getConnectionUp() {
|
|
258
|
-
return this.isConnectionUp;
|
|
259
|
-
};
|
|
260
|
-
|
|
261
278
|
Connection.prototype.on = function on(event, callback) {
|
|
262
279
|
return this.events.on(event, callback);
|
|
263
280
|
};
|
|
@@ -412,52 +429,52 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "d
|
|
|
412
429
|
|
|
413
430
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
414
431
|
|
|
415
|
-
/**
|
|
416
|
-
* Generic payload container with metadata.
|
|
417
|
-
* @constructor
|
|
432
|
+
/**
|
|
433
|
+
* Generic payload container with metadata.
|
|
434
|
+
* @constructor
|
|
418
435
|
*/
|
|
419
436
|
var SMessage = function SMessage() {
|
|
420
437
|
_classCallCheck(this, SMessage);
|
|
421
438
|
|
|
422
|
-
/**
|
|
423
|
-
* Message type to distinguish different message types.
|
|
424
|
-
* @type {string}
|
|
439
|
+
/**
|
|
440
|
+
* Message type to distinguish different message types.
|
|
441
|
+
* @type {string}
|
|
425
442
|
*/
|
|
426
443
|
this.type = _codec2["default"].TYPE;
|
|
427
444
|
|
|
428
|
-
/**
|
|
429
|
-
* Sequence number may be used for flow control.
|
|
430
|
-
* @type {number}
|
|
445
|
+
/**
|
|
446
|
+
* Sequence number may be used for flow control.
|
|
447
|
+
* @type {number}
|
|
431
448
|
*/
|
|
432
449
|
this.sequencenumber = null;
|
|
433
450
|
|
|
434
|
-
/**
|
|
435
|
-
* Timestamp may be used for latency measuring.
|
|
436
|
-
* @type {number}
|
|
451
|
+
/**
|
|
452
|
+
* Timestamp may be used for latency measuring.
|
|
453
|
+
* @type {number}
|
|
437
454
|
*/
|
|
438
455
|
this.timestamp = null;
|
|
439
456
|
|
|
440
|
-
/**
|
|
441
|
-
* Id may be used for request response matching.
|
|
442
|
-
* @type {number}
|
|
457
|
+
/**
|
|
458
|
+
* Id may be used for request response matching.
|
|
459
|
+
* @type {number}
|
|
443
460
|
*/
|
|
444
461
|
this.id = null;
|
|
445
462
|
|
|
446
|
-
/**
|
|
447
|
-
* Encoding of <code>payload</code>.
|
|
448
|
-
* @type {string}
|
|
463
|
+
/**
|
|
464
|
+
* Encoding of <code>payload</code>.
|
|
465
|
+
* @type {string}
|
|
449
466
|
*/
|
|
450
467
|
this.encoding = null;
|
|
451
468
|
|
|
452
|
-
/**
|
|
453
|
-
* Mime type of <code>payload</code>.
|
|
454
|
-
* @type {string}
|
|
469
|
+
/**
|
|
470
|
+
* Mime type of <code>payload</code>.
|
|
471
|
+
* @type {string}
|
|
455
472
|
*/
|
|
456
473
|
this.mimetype = null;
|
|
457
474
|
|
|
458
|
-
/**
|
|
459
|
-
* Payload encoded with <code>encoding</code> and serialized with <code>mimetype</code>.
|
|
460
|
-
* @type {string}
|
|
475
|
+
/**
|
|
476
|
+
* Payload encoded with <code>encoding</code> and serialized with <code>mimetype</code>.
|
|
477
|
+
* @type {string}
|
|
461
478
|
*/
|
|
462
479
|
this.payload = null;
|
|
463
480
|
};
|
|
@@ -536,6 +553,8 @@ var Stream = function () {
|
|
|
536
553
|
_this.events.fire("error", err);
|
|
537
554
|
}).on("reconnect", function (msg) {
|
|
538
555
|
_this.reconnectSuccess(msg);
|
|
556
|
+
}).on("atmoError", function (err) {
|
|
557
|
+
_this.events.fire("atmoError", err);
|
|
539
558
|
});
|
|
540
559
|
|
|
541
560
|
this.requestid = new _UShortId2["default"]();
|
|
@@ -1647,13 +1666,10 @@ var Stream = function () {
|
|
|
1647
1666
|
};
|
|
1648
1667
|
|
|
1649
1668
|
Stream.prototype.onReconnectMessage = function onReconnectMessage(msg) {
|
|
1650
|
-
if (msg.code
|
|
1651
|
-
|
|
1652
|
-
|
|
1653
|
-
|
|
1654
|
-
});
|
|
1655
|
-
this.events.fire("error", event);
|
|
1656
|
-
this.doClose(event);
|
|
1669
|
+
if (msg.code === 450) {
|
|
1670
|
+
this.events.fire("slow", "Reconnection recieved a slow code: " + msg.code);
|
|
1671
|
+
this._isSlowConnection = true;
|
|
1672
|
+
this.conn.setReconnect = false;
|
|
1657
1673
|
}
|
|
1658
1674
|
this.events.fire("reconnectMessage", msg);
|
|
1659
1675
|
console.log(msg);
|
|
@@ -1760,7 +1776,7 @@ var Stream = function () {
|
|
|
1760
1776
|
|
|
1761
1777
|
Stream.prototype.performReconnect = function performReconnect(callback) {
|
|
1762
1778
|
if (this.conn != null && this.conn.isReconnect()) {
|
|
1763
|
-
if (this.conn.
|
|
1779
|
+
if (this.conn.isConnectionUp) {
|
|
1764
1780
|
this.log.warn("Connection is not closed and won't try reconnect.");
|
|
1765
1781
|
return;
|
|
1766
1782
|
}
|
|
@@ -2042,6 +2058,11 @@ var StreamingService = function () {
|
|
|
2042
2058
|
headers['X-Stream-isReceiveLatestMissedData'] = true;
|
|
2043
2059
|
}
|
|
2044
2060
|
|
|
2061
|
+
var _connectionFrom = this.config.connectionFrom;
|
|
2062
|
+
if (_connectionFrom != null) {
|
|
2063
|
+
headers['X-Stream-connectionFrom'] = _connectionFrom;
|
|
2064
|
+
}
|
|
2065
|
+
|
|
2045
2066
|
Object.assign(headers, this.config.credentials.getHeaders());
|
|
2046
2067
|
|
|
2047
2068
|
var request = {
|
|
@@ -2150,38 +2171,38 @@ exports["default"] = UShortId;
|
|
|
2150
2171
|
|
|
2151
2172
|
var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
|
|
2152
2173
|
|
|
2153
|
-
/*
|
|
2154
|
-
* Copyright 2015 Async-IO.org
|
|
2155
|
-
*
|
|
2156
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
2157
|
-
* you may not use this file except in compliance with the License.
|
|
2158
|
-
* You may obtain a copy of the License at
|
|
2159
|
-
*
|
|
2160
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
2161
|
-
*
|
|
2162
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
2163
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
2164
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
2165
|
-
* See the License for the specific language governing permissions and
|
|
2166
|
-
* limitations under the License.
|
|
2174
|
+
/*
|
|
2175
|
+
* Copyright 2015 Async-IO.org
|
|
2176
|
+
*
|
|
2177
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
2178
|
+
* you may not use this file except in compliance with the License.
|
|
2179
|
+
* You may obtain a copy of the License at
|
|
2180
|
+
*
|
|
2181
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
2182
|
+
*
|
|
2183
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
2184
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
2185
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
2186
|
+
* See the License for the specific language governing permissions and
|
|
2187
|
+
* limitations under the License.
|
|
2167
2188
|
*/
|
|
2168
|
-
/**
|
|
2169
|
-
* Added binary message processing that reads from the blob.
|
|
2170
|
-
* Tweaked implementation to support binary messages with streaming protocol:
|
|
2171
|
-
* - edited message calculation logic to support multiple messages that could be read from stream at once
|
|
2172
|
-
* without message size being pre-appended;
|
|
2173
|
-
* - override mimetype to be able to retrieve original byte array;
|
|
2174
|
-
* - don't trim string representation of binary messages.
|
|
2189
|
+
/**
|
|
2190
|
+
* Added binary message processing that reads from the blob.
|
|
2191
|
+
* Tweaked implementation to support binary messages with streaming protocol:
|
|
2192
|
+
* - edited message calculation logic to support multiple messages that could be read from stream at once
|
|
2193
|
+
* without message size being pre-appended;
|
|
2194
|
+
* - override mimetype to be able to retrieve original byte array;
|
|
2195
|
+
* - don't trim string representation of binary messages.
|
|
2175
2196
|
*/
|
|
2176
|
-
/**
|
|
2177
|
-
* Atmosphere.js
|
|
2178
|
-
* https://github.com/Atmosphere/atmosphere-javascript
|
|
2179
|
-
*
|
|
2180
|
-
* API reference
|
|
2181
|
-
* https://github.com/Atmosphere/atmosphere/wiki/jQuery.atmosphere.js-API
|
|
2182
|
-
*
|
|
2183
|
-
* Highly inspired by
|
|
2184
|
-
* - Portal by Donghwan Kim http://flowersinthesand.github.io/portal/
|
|
2197
|
+
/**
|
|
2198
|
+
* Atmosphere.js
|
|
2199
|
+
* https://github.com/Atmosphere/atmosphere-javascript
|
|
2200
|
+
*
|
|
2201
|
+
* API reference
|
|
2202
|
+
* https://github.com/Atmosphere/atmosphere/wiki/jQuery.atmosphere.js-API
|
|
2203
|
+
*
|
|
2204
|
+
* Highly inspired by
|
|
2205
|
+
* - Portal by Donghwan Kim http://flowersinthesand.github.io/portal/
|
|
2185
2206
|
*/
|
|
2186
2207
|
(function (root, factory) {
|
|
2187
2208
|
if (typeof define === "function" && define.amd) {
|
|
@@ -2221,41 +2242,41 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol
|
|
|
2221
2242
|
onClientTimeout: function onClientTimeout(request) {},
|
|
2222
2243
|
onOpenAfterResume: function onOpenAfterResume(request) {},
|
|
2223
2244
|
|
|
2224
|
-
/**
|
|
2225
|
-
* Creates an object based on an atmosphere subscription that exposes functions defined by the Websocket interface.
|
|
2226
|
-
*
|
|
2227
|
-
* @class WebsocketApiAdapter
|
|
2228
|
-
* @param {Object} request the request object to build the underlying subscription
|
|
2229
|
-
* @constructor
|
|
2245
|
+
/**
|
|
2246
|
+
* Creates an object based on an atmosphere subscription that exposes functions defined by the Websocket interface.
|
|
2247
|
+
*
|
|
2248
|
+
* @class WebsocketApiAdapter
|
|
2249
|
+
* @param {Object} request the request object to build the underlying subscription
|
|
2250
|
+
* @constructor
|
|
2230
2251
|
*/
|
|
2231
2252
|
WebsocketApiAdapter: function WebsocketApiAdapter(request) {
|
|
2232
2253
|
var _socket, _adapter;
|
|
2233
2254
|
|
|
2234
|
-
/**
|
|
2235
|
-
* Overrides the onMessage callback in given request.
|
|
2236
|
-
*
|
|
2237
|
-
* @method onMessage
|
|
2238
|
-
* @param {Object} e the event object
|
|
2255
|
+
/**
|
|
2256
|
+
* Overrides the onMessage callback in given request.
|
|
2257
|
+
*
|
|
2258
|
+
* @method onMessage
|
|
2259
|
+
* @param {Object} e the event object
|
|
2239
2260
|
*/
|
|
2240
2261
|
request.onMessage = function (e) {
|
|
2241
2262
|
_adapter.onmessage({ data: e.responseBody });
|
|
2242
2263
|
};
|
|
2243
2264
|
|
|
2244
|
-
/**
|
|
2245
|
-
* Overrides the onMessagePublished callback in given request.
|
|
2246
|
-
*
|
|
2247
|
-
* @method onMessagePublished
|
|
2248
|
-
* @param {Object} e the event object
|
|
2265
|
+
/**
|
|
2266
|
+
* Overrides the onMessagePublished callback in given request.
|
|
2267
|
+
*
|
|
2268
|
+
* @method onMessagePublished
|
|
2269
|
+
* @param {Object} e the event object
|
|
2249
2270
|
*/
|
|
2250
2271
|
request.onMessagePublished = function (e) {
|
|
2251
2272
|
_adapter.onmessage({ data: e.responseBody });
|
|
2252
2273
|
};
|
|
2253
2274
|
|
|
2254
|
-
/**
|
|
2255
|
-
* Overrides the onOpen callback in given request to proxy the event to the adapter.
|
|
2256
|
-
*
|
|
2257
|
-
* @method onOpen
|
|
2258
|
-
* @param {Object} e the event object
|
|
2275
|
+
/**
|
|
2276
|
+
* Overrides the onOpen callback in given request to proxy the event to the adapter.
|
|
2277
|
+
*
|
|
2278
|
+
* @method onOpen
|
|
2279
|
+
* @param {Object} e the event object
|
|
2259
2280
|
*/
|
|
2260
2281
|
request.onOpen = function (e) {
|
|
2261
2282
|
_adapter.onopen(e);
|
|
@@ -2285,10 +2306,10 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol
|
|
|
2285
2306
|
|
|
2286
2307
|
AtmosphereRequest: function AtmosphereRequest(options) {
|
|
2287
2308
|
|
|
2288
|
-
/**
|
|
2289
|
-
* {Object} Request parameters.
|
|
2290
|
-
*
|
|
2291
|
-
* @private
|
|
2309
|
+
/**
|
|
2310
|
+
* {Object} Request parameters.
|
|
2311
|
+
*
|
|
2312
|
+
* @private
|
|
2292
2313
|
*/
|
|
2293
2314
|
var _request = {
|
|
2294
2315
|
timeout: 300000,
|
|
@@ -2353,10 +2374,10 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol
|
|
|
2353
2374
|
onOpenAfterResume: function onOpenAfterResume(request) {}
|
|
2354
2375
|
};
|
|
2355
2376
|
|
|
2356
|
-
/**
|
|
2357
|
-
* {Object} Request's last response.
|
|
2358
|
-
*
|
|
2359
|
-
* @private
|
|
2377
|
+
/**
|
|
2378
|
+
* {Object} Request's last response.
|
|
2379
|
+
*
|
|
2380
|
+
* @private
|
|
2360
2381
|
*/
|
|
2361
2382
|
var _response = {
|
|
2362
2383
|
status: 200,
|
|
@@ -2374,101 +2395,101 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol
|
|
|
2374
2395
|
ffTryingReconnect: false
|
|
2375
2396
|
};
|
|
2376
2397
|
|
|
2377
|
-
/**
|
|
2378
|
-
* {websocket} Opened web socket.
|
|
2379
|
-
*
|
|
2380
|
-
* @private
|
|
2398
|
+
/**
|
|
2399
|
+
* {websocket} Opened web socket.
|
|
2400
|
+
*
|
|
2401
|
+
* @private
|
|
2381
2402
|
*/
|
|
2382
2403
|
var _websocket = null;
|
|
2383
2404
|
|
|
2384
|
-
/**
|
|
2385
|
-
* {SSE} Opened SSE.
|
|
2386
|
-
*
|
|
2387
|
-
* @private
|
|
2405
|
+
/**
|
|
2406
|
+
* {SSE} Opened SSE.
|
|
2407
|
+
*
|
|
2408
|
+
* @private
|
|
2388
2409
|
*/
|
|
2389
2410
|
var _sse = null;
|
|
2390
2411
|
|
|
2391
|
-
/**
|
|
2392
|
-
* {XMLHttpRequest, ActiveXObject} Opened ajax request (in case of http-streaming or long-polling)
|
|
2393
|
-
*
|
|
2394
|
-
* @private
|
|
2412
|
+
/**
|
|
2413
|
+
* {XMLHttpRequest, ActiveXObject} Opened ajax request (in case of http-streaming or long-polling)
|
|
2414
|
+
*
|
|
2415
|
+
* @private
|
|
2395
2416
|
*/
|
|
2396
2417
|
var _activeRequest = null;
|
|
2397
2418
|
|
|
2398
|
-
/**
|
|
2399
|
-
* {Object} Object use for streaming with IE.
|
|
2400
|
-
*
|
|
2401
|
-
* @private
|
|
2419
|
+
/**
|
|
2420
|
+
* {Object} Object use for streaming with IE.
|
|
2421
|
+
*
|
|
2422
|
+
* @private
|
|
2402
2423
|
*/
|
|
2403
2424
|
var _ieStream = null;
|
|
2404
2425
|
|
|
2405
|
-
/**
|
|
2406
|
-
* {Object} Object use for jsonp transport.
|
|
2407
|
-
*
|
|
2408
|
-
* @private
|
|
2426
|
+
/**
|
|
2427
|
+
* {Object} Object use for jsonp transport.
|
|
2428
|
+
*
|
|
2429
|
+
* @private
|
|
2409
2430
|
*/
|
|
2410
2431
|
var _jqxhr = null;
|
|
2411
2432
|
|
|
2412
|
-
/**
|
|
2413
|
-
* {boolean} If request has been subscribed or not.
|
|
2414
|
-
*
|
|
2415
|
-
* @private
|
|
2433
|
+
/**
|
|
2434
|
+
* {boolean} If request has been subscribed or not.
|
|
2435
|
+
*
|
|
2436
|
+
* @private
|
|
2416
2437
|
*/
|
|
2417
2438
|
var _subscribed = true;
|
|
2418
2439
|
|
|
2419
|
-
/**
|
|
2420
|
-
* {number} Number of test reconnection.
|
|
2421
|
-
*
|
|
2422
|
-
* @private
|
|
2440
|
+
/**
|
|
2441
|
+
* {number} Number of test reconnection.
|
|
2442
|
+
*
|
|
2443
|
+
* @private
|
|
2423
2444
|
*/
|
|
2424
2445
|
var _requestCount = 0;
|
|
2425
2446
|
|
|
2426
|
-
/**
|
|
2427
|
-
* The Heartbeat interval send by the server.
|
|
2428
|
-
* @type {int}
|
|
2429
|
-
* @private
|
|
2447
|
+
/**
|
|
2448
|
+
* The Heartbeat interval send by the server.
|
|
2449
|
+
* @type {int}
|
|
2450
|
+
* @private
|
|
2430
2451
|
*/
|
|
2431
2452
|
var _heartbeatInterval = 0;
|
|
2432
2453
|
|
|
2433
|
-
/**
|
|
2434
|
-
* The Heartbeat bytes send by the server.
|
|
2435
|
-
* @type {string}
|
|
2436
|
-
* @private
|
|
2454
|
+
/**
|
|
2455
|
+
* The Heartbeat bytes send by the server.
|
|
2456
|
+
* @type {string}
|
|
2457
|
+
* @private
|
|
2437
2458
|
*/
|
|
2438
2459
|
var _heartbeatPadding = 'X';
|
|
2439
2460
|
|
|
2440
|
-
/**
|
|
2441
|
-
* {boolean} If request is currently aborted.
|
|
2442
|
-
*
|
|
2443
|
-
* @private
|
|
2461
|
+
/**
|
|
2462
|
+
* {boolean} If request is currently aborted.
|
|
2463
|
+
*
|
|
2464
|
+
* @private
|
|
2444
2465
|
*/
|
|
2445
2466
|
var _abortingConnection = false;
|
|
2446
2467
|
|
|
2447
|
-
/**
|
|
2448
|
-
* A local "channel' of communication.
|
|
2449
|
-
*
|
|
2450
|
-
* @private
|
|
2468
|
+
/**
|
|
2469
|
+
* A local "channel' of communication.
|
|
2470
|
+
*
|
|
2471
|
+
* @private
|
|
2451
2472
|
*/
|
|
2452
2473
|
var _localSocketF = null;
|
|
2453
2474
|
|
|
2454
|
-
/**
|
|
2455
|
-
* The storage used.
|
|
2456
|
-
*
|
|
2457
|
-
* @private
|
|
2475
|
+
/**
|
|
2476
|
+
* The storage used.
|
|
2477
|
+
*
|
|
2478
|
+
* @private
|
|
2458
2479
|
*/
|
|
2459
2480
|
var _storageService;
|
|
2460
2481
|
|
|
2461
|
-
/**
|
|
2462
|
-
* Local communication
|
|
2463
|
-
*
|
|
2464
|
-
* @private
|
|
2482
|
+
/**
|
|
2483
|
+
* Local communication
|
|
2484
|
+
*
|
|
2485
|
+
* @private
|
|
2465
2486
|
*/
|
|
2466
2487
|
var _localStorageService = null;
|
|
2467
2488
|
|
|
2468
|
-
/**
|
|
2469
|
-
* A Unique ID
|
|
2470
|
-
*
|
|
2471
|
-
* @private
|
|
2489
|
+
/**
|
|
2490
|
+
* A Unique ID
|
|
2491
|
+
*
|
|
2492
|
+
* @private
|
|
2472
2493
|
*/
|
|
2473
2494
|
var guid = atmosphere.util.now();
|
|
2474
2495
|
|
|
@@ -2478,21 +2499,21 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol
|
|
|
2478
2499
|
/** Key for connection sharing */
|
|
2479
2500
|
var _sharingKey;
|
|
2480
2501
|
|
|
2481
|
-
/**
|
|
2482
|
-
* {boolean} If window beforeUnload event has been called.
|
|
2483
|
-
* Flag will be reset after 5000 ms
|
|
2484
|
-
*
|
|
2485
|
-
* @private
|
|
2502
|
+
/**
|
|
2503
|
+
* {boolean} If window beforeUnload event has been called.
|
|
2504
|
+
* Flag will be reset after 5000 ms
|
|
2505
|
+
*
|
|
2506
|
+
* @private
|
|
2486
2507
|
*/
|
|
2487
2508
|
var _beforeUnloadState = false;
|
|
2488
2509
|
|
|
2489
2510
|
// Automatic call to subscribe
|
|
2490
2511
|
_subscribe(options);
|
|
2491
2512
|
|
|
2492
|
-
/**
|
|
2493
|
-
* Initialize atmosphere request object.
|
|
2494
|
-
*
|
|
2495
|
-
* @private
|
|
2513
|
+
/**
|
|
2514
|
+
* Initialize atmosphere request object.
|
|
2515
|
+
*
|
|
2516
|
+
* @private
|
|
2496
2517
|
*/
|
|
2497
2518
|
function _init() {
|
|
2498
2519
|
_subscribed = true;
|
|
@@ -2505,20 +2526,20 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol
|
|
|
2505
2526
|
_ieStream = null;
|
|
2506
2527
|
}
|
|
2507
2528
|
|
|
2508
|
-
/**
|
|
2509
|
-
* Re-initialize atmosphere object.
|
|
2510
|
-
*
|
|
2511
|
-
* @private
|
|
2529
|
+
/**
|
|
2530
|
+
* Re-initialize atmosphere object.
|
|
2531
|
+
*
|
|
2532
|
+
* @private
|
|
2512
2533
|
*/
|
|
2513
2534
|
function _reinit() {
|
|
2514
2535
|
_clearState();
|
|
2515
2536
|
_init();
|
|
2516
2537
|
}
|
|
2517
2538
|
|
|
2518
|
-
/**
|
|
2519
|
-
* Returns true if the given level is equal or above the configured log level.
|
|
2520
|
-
*
|
|
2521
|
-
* @private
|
|
2539
|
+
/**
|
|
2540
|
+
* Returns true if the given level is equal or above the configured log level.
|
|
2541
|
+
*
|
|
2542
|
+
* @private
|
|
2522
2543
|
*/
|
|
2523
2544
|
function _canLog(level) {
|
|
2524
2545
|
if (level == 'debug') {
|
|
@@ -2540,9 +2561,9 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol
|
|
|
2540
2561
|
}
|
|
2541
2562
|
}
|
|
2542
2563
|
|
|
2543
|
-
/**
|
|
2544
|
-
*
|
|
2545
|
-
* @private
|
|
2564
|
+
/**
|
|
2565
|
+
*
|
|
2566
|
+
* @private
|
|
2546
2567
|
*/
|
|
2547
2568
|
function _verifyStreamingLength(ajaxRequest, rq) {
|
|
2548
2569
|
// Wait to be sure we have the full message before closing.
|
|
@@ -2552,10 +2573,10 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol
|
|
|
2552
2573
|
return false;
|
|
2553
2574
|
}
|
|
2554
2575
|
|
|
2555
|
-
/**
|
|
2556
|
-
* Disconnect
|
|
2557
|
-
*
|
|
2558
|
-
* @private
|
|
2576
|
+
/**
|
|
2577
|
+
* Disconnect
|
|
2578
|
+
*
|
|
2579
|
+
* @private
|
|
2559
2580
|
*/
|
|
2560
2581
|
function _disconnect() {
|
|
2561
2582
|
if (_request.enableProtocol && !_request.disableDisconnect && !_request.firstMessage) {
|
|
@@ -2592,10 +2613,10 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol
|
|
|
2592
2613
|
}
|
|
2593
2614
|
}
|
|
2594
2615
|
|
|
2595
|
-
/**
|
|
2596
|
-
* Close request.
|
|
2597
|
-
*
|
|
2598
|
-
* @private
|
|
2616
|
+
/**
|
|
2617
|
+
* Close request.
|
|
2618
|
+
*
|
|
2619
|
+
* @private
|
|
2599
2620
|
*/
|
|
2600
2621
|
function _close() {
|
|
2601
2622
|
_debug("Closing (AtmosphereRequest._close() called)");
|
|
@@ -2682,12 +2703,12 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol
|
|
|
2682
2703
|
}
|
|
2683
2704
|
}
|
|
2684
2705
|
|
|
2685
|
-
/**
|
|
2686
|
-
* Subscribe request using request transport. <br>
|
|
2687
|
-
* If request is currently opened, this one will be closed.
|
|
2688
|
-
*
|
|
2689
|
-
* @param {Object} Request parameters.
|
|
2690
|
-
* @private
|
|
2706
|
+
/**
|
|
2707
|
+
* Subscribe request using request transport. <br>
|
|
2708
|
+
* If request is currently opened, this one will be closed.
|
|
2709
|
+
*
|
|
2710
|
+
* @param {Object} Request parameters.
|
|
2711
|
+
* @private
|
|
2691
2712
|
*/
|
|
2692
2713
|
function _subscribe(options) {
|
|
2693
2714
|
_reinit();
|
|
@@ -2700,21 +2721,21 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol
|
|
|
2700
2721
|
}
|
|
2701
2722
|
}
|
|
2702
2723
|
|
|
2703
|
-
/**
|
|
2704
|
-
* Check if web socket is supported (check for custom implementation provided by request object or browser implementation).
|
|
2705
|
-
*
|
|
2706
|
-
* @returns {boolean} True if web socket is supported, false otherwise.
|
|
2707
|
-
* @private
|
|
2724
|
+
/**
|
|
2725
|
+
* Check if web socket is supported (check for custom implementation provided by request object or browser implementation).
|
|
2726
|
+
*
|
|
2727
|
+
* @returns {boolean} True if web socket is supported, false otherwise.
|
|
2728
|
+
* @private
|
|
2708
2729
|
*/
|
|
2709
2730
|
function _supportWebsocket() {
|
|
2710
2731
|
return _request.webSocketImpl != null || window.WebSocket || window.MozWebSocket;
|
|
2711
2732
|
}
|
|
2712
2733
|
|
|
2713
|
-
/**
|
|
2714
|
-
* Check if server side events (SSE) is supported (check for custom implementation provided by request object or browser implementation).
|
|
2715
|
-
*
|
|
2716
|
-
* @returns {boolean} True if web socket is supported, false otherwise.
|
|
2717
|
-
* @private
|
|
2734
|
+
/**
|
|
2735
|
+
* Check if server side events (SSE) is supported (check for custom implementation provided by request object or browser implementation).
|
|
2736
|
+
*
|
|
2737
|
+
* @returns {boolean} True if web socket is supported, false otherwise.
|
|
2738
|
+
* @private
|
|
2718
2739
|
*/
|
|
2719
2740
|
function _supportSSE() {
|
|
2720
2741
|
// Origin parts
|
|
@@ -2730,11 +2751,11 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol
|
|
|
2730
2751
|
return window.EventSource && (!crossOrigin || !atmosphere.util.browser.safari || atmosphere.util.browser.vmajor >= 7);
|
|
2731
2752
|
}
|
|
2732
2753
|
|
|
2733
|
-
/**
|
|
2734
|
-
* Open request using request transport. <br>
|
|
2735
|
-
* If request transport is 'websocket' but websocket can't be opened, request will automatically reconnect using fallback transport.
|
|
2736
|
-
*
|
|
2737
|
-
* @private
|
|
2754
|
+
/**
|
|
2755
|
+
* Open request using request transport. <br>
|
|
2756
|
+
* If request transport is 'websocket' but websocket can't be opened, request will automatically reconnect using fallback transport.
|
|
2757
|
+
*
|
|
2758
|
+
* @private
|
|
2738
2759
|
*/
|
|
2739
2760
|
function _execute() {
|
|
2740
2761
|
// Shared across multiple tabs/windows.
|
|
@@ -3148,8 +3169,8 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol
|
|
|
3148
3169
|
_storageService = storageService;
|
|
3149
3170
|
}
|
|
3150
3171
|
|
|
3151
|
-
/**
|
|
3152
|
-
* @private
|
|
3172
|
+
/**
|
|
3173
|
+
* @private
|
|
3153
3174
|
*/
|
|
3154
3175
|
function _open(state, transport, request) {
|
|
3155
3176
|
if (_request.shared && transport !== 'local') {
|
|
@@ -3183,11 +3204,11 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol
|
|
|
3183
3204
|
}
|
|
3184
3205
|
}
|
|
3185
3206
|
|
|
3186
|
-
/**
|
|
3187
|
-
* Execute request using jsonp transport.
|
|
3188
|
-
*
|
|
3189
|
-
* @param request {Object} request Request parameters, if undefined _request object will be used.
|
|
3190
|
-
* @private
|
|
3207
|
+
/**
|
|
3208
|
+
* Execute request using jsonp transport.
|
|
3209
|
+
*
|
|
3210
|
+
* @param request {Object} request Request parameters, if undefined _request object will be used.
|
|
3211
|
+
* @private
|
|
3191
3212
|
*/
|
|
3192
3213
|
function _jsonp(request) {
|
|
3193
3214
|
// When CORS is enabled, make sure we force the proper transport.
|
|
@@ -3317,12 +3338,12 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol
|
|
|
3317
3338
|
_jqxhr.open();
|
|
3318
3339
|
}
|
|
3319
3340
|
|
|
3320
|
-
/**
|
|
3321
|
-
* Build websocket object.
|
|
3322
|
-
*
|
|
3323
|
-
* @param location {string} Web socket url.
|
|
3324
|
-
* @returns {websocket} Web socket object.
|
|
3325
|
-
* @private
|
|
3341
|
+
/**
|
|
3342
|
+
* Build websocket object.
|
|
3343
|
+
*
|
|
3344
|
+
* @param location {string} Web socket url.
|
|
3345
|
+
* @returns {websocket} Web socket object.
|
|
3346
|
+
* @private
|
|
3326
3347
|
*/
|
|
3327
3348
|
function _getWebSocket(location) {
|
|
3328
3349
|
if (_request.webSocketImpl != null) {
|
|
@@ -3338,32 +3359,32 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol
|
|
|
3338
3359
|
}
|
|
3339
3360
|
}
|
|
3340
3361
|
|
|
3341
|
-
/**
|
|
3342
|
-
* Build web socket url from request url.
|
|
3343
|
-
*
|
|
3344
|
-
* @return {string} Web socket url (start with "ws" or "wss" for secure web socket).
|
|
3345
|
-
* @private
|
|
3362
|
+
/**
|
|
3363
|
+
* Build web socket url from request url.
|
|
3364
|
+
*
|
|
3365
|
+
* @return {string} Web socket url (start with "ws" or "wss" for secure web socket).
|
|
3366
|
+
* @private
|
|
3346
3367
|
*/
|
|
3347
3368
|
function _buildWebSocketUrl() {
|
|
3348
3369
|
return _attachHeaders(_request, atmosphere.util.getAbsoluteURL(_request.webSocketUrl || _request.url)).replace(/^http/, "ws");
|
|
3349
3370
|
}
|
|
3350
3371
|
|
|
3351
|
-
/**
|
|
3352
|
-
* Build SSE url from request url.
|
|
3353
|
-
*
|
|
3354
|
-
* @return a url with Atmosphere's headers
|
|
3355
|
-
* @private
|
|
3372
|
+
/**
|
|
3373
|
+
* Build SSE url from request url.
|
|
3374
|
+
*
|
|
3375
|
+
* @return a url with Atmosphere's headers
|
|
3376
|
+
* @private
|
|
3356
3377
|
*/
|
|
3357
3378
|
function _buildSSEUrl() {
|
|
3358
3379
|
var url = _attachHeaders(_request);
|
|
3359
3380
|
return url;
|
|
3360
3381
|
}
|
|
3361
3382
|
|
|
3362
|
-
/**
|
|
3363
|
-
* Open SSE. <br>
|
|
3364
|
-
* Automatically use fallback transport if SSE can't be opened.
|
|
3365
|
-
*
|
|
3366
|
-
* @private
|
|
3383
|
+
/**
|
|
3384
|
+
* Open SSE. <br>
|
|
3385
|
+
* Automatically use fallback transport if SSE can't be opened.
|
|
3386
|
+
*
|
|
3387
|
+
* @private
|
|
3367
3388
|
*/
|
|
3368
3389
|
function _executeSSE(sseOpened) {
|
|
3369
3390
|
|
|
@@ -3444,9 +3465,9 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol
|
|
|
3444
3465
|
|
|
3445
3466
|
// https://github.com/remy/polyfills/blob/master/EventSource.js
|
|
3446
3467
|
// Since we polling.
|
|
3447
|
-
/* if (_sse.URL) {
|
|
3448
|
-
_sse.interval = 100;
|
|
3449
|
-
_sse.URL = _buildSSEUrl();
|
|
3468
|
+
/* if (_sse.URL) {
|
|
3469
|
+
_sse.interval = 100;
|
|
3470
|
+
_sse.URL = _buildSSEUrl();
|
|
3450
3471
|
} */
|
|
3451
3472
|
|
|
3452
3473
|
if (!skipCallbackInvocation) {
|
|
@@ -3495,11 +3516,11 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol
|
|
|
3495
3516
|
};
|
|
3496
3517
|
}
|
|
3497
3518
|
|
|
3498
|
-
/**
|
|
3499
|
-
* Open web socket. <br>
|
|
3500
|
-
* Automatically use fallback transport if web socket can't be opened.
|
|
3501
|
-
*
|
|
3502
|
-
* @private
|
|
3519
|
+
/**
|
|
3520
|
+
* Open web socket. <br>
|
|
3521
|
+
* Automatically use fallback transport if web socket can't be opened.
|
|
3522
|
+
*
|
|
3523
|
+
* @private
|
|
3503
3524
|
*/
|
|
3504
3525
|
function _executeWebSocket(webSocketOpened) {
|
|
3505
3526
|
|
|
@@ -3675,7 +3696,8 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol
|
|
|
3675
3696
|
return;
|
|
3676
3697
|
}
|
|
3677
3698
|
|
|
3678
|
-
|
|
3699
|
+
//Patched by Quotemedia
|
|
3700
|
+
_invokeClose(webSocketOpened, message);
|
|
3679
3701
|
|
|
3680
3702
|
_response.state = 'closed';
|
|
3681
3703
|
|
|
@@ -3838,12 +3860,12 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol
|
|
|
3838
3860
|
_invokeCallback();
|
|
3839
3861
|
}
|
|
3840
3862
|
|
|
3841
|
-
/**
|
|
3842
|
-
* Track received message and make sure callbacks/functions are only invoked when the complete message has been received.
|
|
3843
|
-
*
|
|
3844
|
-
* @param message
|
|
3845
|
-
* @param request
|
|
3846
|
-
* @param response
|
|
3863
|
+
/**
|
|
3864
|
+
* Track received message and make sure callbacks/functions are only invoked when the complete message has been received.
|
|
3865
|
+
*
|
|
3866
|
+
* @param message
|
|
3867
|
+
* @param request
|
|
3868
|
+
* @param response
|
|
3847
3869
|
*/
|
|
3848
3870
|
function _trackMessageSize(message, request, response) {
|
|
3849
3871
|
// skip message tracking for binary messages
|
|
@@ -3902,11 +3924,11 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol
|
|
|
3902
3924
|
return false;
|
|
3903
3925
|
}
|
|
3904
3926
|
|
|
3905
|
-
/**
|
|
3906
|
-
* Reconnect request with fallback transport. <br>
|
|
3907
|
-
* Used in case websocket can't be opened.
|
|
3908
|
-
*
|
|
3909
|
-
* @private
|
|
3927
|
+
/**
|
|
3928
|
+
* Reconnect request with fallback transport. <br>
|
|
3929
|
+
* Used in case websocket can't be opened.
|
|
3930
|
+
*
|
|
3931
|
+
* @private
|
|
3910
3932
|
*/
|
|
3911
3933
|
function _reconnectWithFallbackTransport(errorMessage) {
|
|
3912
3934
|
atmosphere.util.log(_request.logLevel, [errorMessage]);
|
|
@@ -3935,13 +3957,13 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol
|
|
|
3935
3957
|
}
|
|
3936
3958
|
}
|
|
3937
3959
|
|
|
3938
|
-
/**
|
|
3939
|
-
* Get url from request and attach headers to it.
|
|
3940
|
-
*
|
|
3941
|
-
* @param request {Object} request Request parameters, if undefined _request object will be used.
|
|
3942
|
-
*
|
|
3943
|
-
* @returns {Object} Request object, if undefined, _request object will be used.
|
|
3944
|
-
* @private
|
|
3960
|
+
/**
|
|
3961
|
+
* Get url from request and attach headers to it.
|
|
3962
|
+
*
|
|
3963
|
+
* @param request {Object} request Request parameters, if undefined _request object will be used.
|
|
3964
|
+
*
|
|
3965
|
+
* @returns {Object} Request object, if undefined, _request object will be used.
|
|
3966
|
+
* @private
|
|
3945
3967
|
*/
|
|
3946
3968
|
function _attachHeaders(request, url) {
|
|
3947
3969
|
var rq = _request;
|
|
@@ -4026,11 +4048,11 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol
|
|
|
4026
4048
|
}
|
|
4027
4049
|
}
|
|
4028
4050
|
|
|
4029
|
-
/**
|
|
4030
|
-
* Execute ajax request. <br>
|
|
4031
|
-
*
|
|
4032
|
-
* @param request {Object} request Request parameters, if undefined _request object will be used.
|
|
4033
|
-
* @private
|
|
4051
|
+
/**
|
|
4052
|
+
* Execute ajax request. <br>
|
|
4053
|
+
*
|
|
4054
|
+
* @param request {Object} request Request parameters, if undefined _request object will be used.
|
|
4055
|
+
* @private
|
|
4034
4056
|
*/
|
|
4035
4057
|
function _executeRequest(request) {
|
|
4036
4058
|
var rq = _request;
|
|
@@ -4323,12 +4345,12 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol
|
|
|
4323
4345
|
_reconnect(ajaxRequest, rq, 500);
|
|
4324
4346
|
}
|
|
4325
4347
|
|
|
4326
|
-
/**
|
|
4327
|
-
* Do ajax request.
|
|
4328
|
-
*
|
|
4329
|
-
* @param ajaxRequest Ajax request.
|
|
4330
|
-
* @param request Request parameters.
|
|
4331
|
-
* @param create If ajax request has to be open.
|
|
4348
|
+
/**
|
|
4349
|
+
* Do ajax request.
|
|
4350
|
+
*
|
|
4351
|
+
* @param ajaxRequest Ajax request.
|
|
4352
|
+
* @param request Request parameters.
|
|
4353
|
+
* @param create If ajax request has to be open.
|
|
4332
4354
|
*/
|
|
4333
4355
|
function _doRequest(ajaxRequest, request, create) {
|
|
4334
4356
|
// Prevent Android to cache request
|
|
@@ -4705,12 +4727,12 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol
|
|
|
4705
4727
|
};
|
|
4706
4728
|
}
|
|
4707
4729
|
|
|
4708
|
-
/**
|
|
4709
|
-
* Send message. <br>
|
|
4710
|
-
* Will be automatically dispatch to other connected.
|
|
4711
|
-
*
|
|
4712
|
-
* @param {Object, string} Message to send.
|
|
4713
|
-
* @private
|
|
4730
|
+
/**
|
|
4731
|
+
* Send message. <br>
|
|
4732
|
+
* Will be automatically dispatch to other connected.
|
|
4733
|
+
*
|
|
4734
|
+
* @param {Object, string} Message to send.
|
|
4735
|
+
* @private
|
|
4714
4736
|
*/
|
|
4715
4737
|
function _push(message) {
|
|
4716
4738
|
|
|
@@ -4766,22 +4788,22 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol
|
|
|
4766
4788
|
}
|
|
4767
4789
|
}
|
|
4768
4790
|
|
|
4769
|
-
/**
|
|
4770
|
-
* Send a message using currently opened ajax request (using http-streaming or long-polling). <br>
|
|
4771
|
-
*
|
|
4772
|
-
* @param {string, Object} Message to send. This is an object, string message is saved in data member.
|
|
4773
|
-
* @private
|
|
4791
|
+
/**
|
|
4792
|
+
* Send a message using currently opened ajax request (using http-streaming or long-polling). <br>
|
|
4793
|
+
*
|
|
4794
|
+
* @param {string, Object} Message to send. This is an object, string message is saved in data member.
|
|
4795
|
+
* @private
|
|
4774
4796
|
*/
|
|
4775
4797
|
function _pushAjaxMessage(message) {
|
|
4776
4798
|
var rq = _getPushRequest(message);
|
|
4777
4799
|
_executeRequest(rq);
|
|
4778
4800
|
}
|
|
4779
4801
|
|
|
4780
|
-
/**
|
|
4781
|
-
* Send a message using currently opened ie streaming (using http-streaming or long-polling). <br>
|
|
4782
|
-
*
|
|
4783
|
-
* @param {string, Object} Message to send. This is an object, string message is saved in data member.
|
|
4784
|
-
* @private
|
|
4802
|
+
/**
|
|
4803
|
+
* Send a message using currently opened ie streaming (using http-streaming or long-polling). <br>
|
|
4804
|
+
*
|
|
4805
|
+
* @param {string, Object} Message to send. This is an object, string message is saved in data member.
|
|
4806
|
+
* @private
|
|
4785
4807
|
*/
|
|
4786
4808
|
function _pushIE(message) {
|
|
4787
4809
|
if (_request.enableXDR && atmosphere.util.checkCORSSupport()) {
|
|
@@ -4794,11 +4816,11 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol
|
|
|
4794
4816
|
}
|
|
4795
4817
|
}
|
|
4796
4818
|
|
|
4797
|
-
/**
|
|
4798
|
-
* Send a message using jsonp transport. <br>
|
|
4799
|
-
*
|
|
4800
|
-
* @param {string, Object} Message to send. This is an object, string message is saved in data member.
|
|
4801
|
-
* @private
|
|
4819
|
+
/**
|
|
4820
|
+
* Send a message using jsonp transport. <br>
|
|
4821
|
+
*
|
|
4822
|
+
* @param {string, Object} Message to send. This is an object, string message is saved in data member.
|
|
4823
|
+
* @private
|
|
4802
4824
|
*/
|
|
4803
4825
|
function _pushJsonp(message) {
|
|
4804
4826
|
_pushAjaxMessage(message);
|
|
@@ -4812,11 +4834,11 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol
|
|
|
4812
4834
|
return msg;
|
|
4813
4835
|
}
|
|
4814
4836
|
|
|
4815
|
-
/**
|
|
4816
|
-
* Build request use to push message using method 'POST' <br>. Transport is defined as 'polling' and 'suspend' is set to false.
|
|
4817
|
-
*
|
|
4818
|
-
* @return {Object} Request object use to push message.
|
|
4819
|
-
* @private
|
|
4837
|
+
/**
|
|
4838
|
+
* Build request use to push message using method 'POST' <br>. Transport is defined as 'polling' and 'suspend' is set to false.
|
|
4839
|
+
*
|
|
4840
|
+
* @return {Object} Request object use to push message.
|
|
4841
|
+
* @private
|
|
4820
4842
|
*/
|
|
4821
4843
|
function _getPushRequest(message) {
|
|
4822
4844
|
var msg = _getStringMessage(message);
|
|
@@ -4858,9 +4880,9 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol
|
|
|
4858
4880
|
return rq;
|
|
4859
4881
|
}
|
|
4860
4882
|
|
|
4861
|
-
/**
|
|
4862
|
-
* Send a message using currently opened websocket. <br>
|
|
4863
|
-
*
|
|
4883
|
+
/**
|
|
4884
|
+
* Send a message using currently opened websocket. <br>
|
|
4885
|
+
*
|
|
4864
4886
|
*/
|
|
4865
4887
|
function _pushWebSocket(message) {
|
|
4866
4888
|
var msg = atmosphere.util.isBinary(message) ? message : _getStringMessage(message);
|
|
@@ -4998,20 +5020,22 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol
|
|
|
4998
5020
|
}
|
|
4999
5021
|
}
|
|
5000
5022
|
|
|
5001
|
-
|
|
5023
|
+
//Patched by Quotemedia
|
|
5024
|
+
function _invokeClose(wasOpen, message) {
|
|
5002
5025
|
if (_response.state !== 'closed') {
|
|
5003
5026
|
_response.state = 'closed';
|
|
5004
5027
|
_response.responseBody = "";
|
|
5005
5028
|
_response.messages = [];
|
|
5029
|
+
_response.atmoMessage = message;
|
|
5006
5030
|
_response.status = !wasOpen ? 501 : 200;
|
|
5007
5031
|
_invokeCallback();
|
|
5008
5032
|
}
|
|
5009
5033
|
}
|
|
5010
5034
|
|
|
5011
|
-
/**
|
|
5012
|
-
* Invoke request callbacks.
|
|
5013
|
-
*
|
|
5014
|
-
* @private
|
|
5035
|
+
/**
|
|
5036
|
+
* Invoke request callbacks.
|
|
5037
|
+
*
|
|
5038
|
+
* @private
|
|
5015
5039
|
*/
|
|
5016
5040
|
function _invokeCallback() {
|
|
5017
5041
|
var call = function call(index, func) {
|
|
@@ -5850,21 +5874,21 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "d
|
|
|
5850
5874
|
|
|
5851
5875
|
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj["default"] = obj; return newObj; } }
|
|
5852
5876
|
|
|
5853
|
-
/*
|
|
5854
|
-
Note: Usage of formatters can cause a potential performance penalty
|
|
5877
|
+
/*
|
|
5878
|
+
Note: Usage of formatters can cause a potential performance penalty
|
|
5855
5879
|
*/
|
|
5856
5880
|
|
|
5857
5881
|
/* Keep synchronized with com.quotemedia.streamer.client.fmt.FmtMessage */
|
|
5858
5882
|
|
|
5859
5883
|
var fmt = {};
|
|
5860
5884
|
|
|
5861
|
-
/**
|
|
5862
|
-
* Creates a new message formatter.
|
|
5863
|
-
* @constructor
|
|
5885
|
+
/**
|
|
5886
|
+
* Creates a new message formatter.
|
|
5887
|
+
* @constructor
|
|
5864
5888
|
*/
|
|
5865
5889
|
fmt.Formatter = function () {
|
|
5866
|
-
/**
|
|
5867
|
-
* Formatters by message type.
|
|
5890
|
+
/**
|
|
5891
|
+
* Formatters by message type.
|
|
5868
5892
|
*/
|
|
5869
5893
|
this.formatters = {};
|
|
5870
5894
|
this.formatters[fmt.Formatter._UNKOWNTYPE] = this._fmtunknown;
|
|
@@ -5920,6 +5944,7 @@ fmt.Formatter = function () {
|
|
|
5920
5944
|
this.formatters[_streamerApi.messages.MessageTypeNames.data.TRADENOTIFICATION] = this._fmttradeNotification;
|
|
5921
5945
|
this.formatters[_streamerApi.messages.MessageTypeNames.data.NEWSCMDFILTER] = this._fmtnewscmdfilter;
|
|
5922
5946
|
this.formatters[_streamerApi.messages.MessageTypeNames.data.NEWSERROR] = this._fmtnewserror;
|
|
5947
|
+
this.formatters[_streamerApi.messages.MessageTypeNames.data.DIVIDEND] = this._fmtdividend;
|
|
5923
5948
|
};
|
|
5924
5949
|
|
|
5925
5950
|
fmt.Formatter._UNKOWNTYPE = '__UNKNOWN__';
|
|
@@ -6554,6 +6579,33 @@ fmt.Formatter.prototype._fmtnewserror = function (val) {
|
|
|
6554
6579
|
return s.toString();
|
|
6555
6580
|
};
|
|
6556
6581
|
|
|
6582
|
+
fmt.Formatter.prototype._fmtdividend = function (val) {
|
|
6583
|
+
var s = new fmt.StringBuilder();
|
|
6584
|
+
s.append("DV");
|
|
6585
|
+
s.sep();
|
|
6586
|
+
s.datetime(val.occuredOn);
|
|
6587
|
+
s.sep();
|
|
6588
|
+
s.append(val.symbolId);
|
|
6589
|
+
s.sep();
|
|
6590
|
+
s.append(val.instrument);
|
|
6591
|
+
s.sep();
|
|
6592
|
+
s.datetime(val.declarationDate);
|
|
6593
|
+
s.sep();
|
|
6594
|
+
s.datetime(val.executionDate);
|
|
6595
|
+
s.sep();
|
|
6596
|
+
s.datetime(val.recordDate);
|
|
6597
|
+
s.sep();
|
|
6598
|
+
s.datetime(val.paymentDate);
|
|
6599
|
+
s.sep();
|
|
6600
|
+
s.append(val.amount);
|
|
6601
|
+
s.sep();
|
|
6602
|
+
s.append(val.frequency);
|
|
6603
|
+
s.sep();
|
|
6604
|
+
s.append(val.paymentType);
|
|
6605
|
+
|
|
6606
|
+
return s.toString();
|
|
6607
|
+
};
|
|
6608
|
+
|
|
6557
6609
|
fmt.Formatter.prototype._fmtheartbeat = function (val) {
|
|
6558
6610
|
var s = new fmt.StringBuilder();
|
|
6559
6611
|
s.append("HEARBEAT");
|
|
@@ -6733,6 +6785,8 @@ fmt.Formatter.prototype._fmtreconnectresponse = function (val) {
|
|
|
6733
6785
|
s.append(val.maxEntitlementsPerSubscription);
|
|
6734
6786
|
s.sep();
|
|
6735
6787
|
s.sep(val.entitlements);
|
|
6788
|
+
s.sep();
|
|
6789
|
+
s.sep(val.exchangeEntitlements);
|
|
6736
6790
|
return s.toString();
|
|
6737
6791
|
};
|
|
6738
6792
|
|
|
@@ -6832,12 +6886,16 @@ fmt.Formatter.prototype._fmtmisseddatasent = function (val) {
|
|
|
6832
6886
|
s.datetime(val.timestamp);
|
|
6833
6887
|
s.sep();
|
|
6834
6888
|
s.append(val.requestId);
|
|
6889
|
+
s.sep();
|
|
6890
|
+
s.append(val.totalDataSent);
|
|
6891
|
+
s.sep();
|
|
6892
|
+
s.append(val.totalDataHeld);
|
|
6835
6893
|
return s.toString();
|
|
6836
6894
|
};
|
|
6837
6895
|
|
|
6838
|
-
/**
|
|
6839
|
-
* Create a new sting builder.
|
|
6840
|
-
* @constructor
|
|
6896
|
+
/**
|
|
6897
|
+
* Create a new sting builder.
|
|
6898
|
+
* @constructor
|
|
6841
6899
|
*/
|
|
6842
6900
|
fmt.StringBuilder = function () {
|
|
6843
6901
|
this._str = '';
|
|
@@ -6993,6 +7051,10 @@ if (window) {
|
|
|
6993
7051
|
}
|
|
6994
7052
|
|
|
6995
7053
|
_Streamer2["default"].formatting = fmt;
|
|
7054
|
+
/**
|
|
7055
|
+
* Checks for the streamer dataType,
|
|
7056
|
+
* @deprecated Use Streamer.marketDataTypes
|
|
7057
|
+
*/
|
|
6996
7058
|
_Streamer2["default"].dataTypes = _streamerApi.messages.control.MarketdataType;
|
|
6997
7059
|
_Streamer2["default"].dataTypes.get = function (msg) {
|
|
6998
7060
|
var messageType = utils.getMessageName(msg);
|
|
@@ -7003,6 +7065,28 @@ _Streamer2["default"].dataTypes.get = function (msg) {
|
|
|
7003
7065
|
}
|
|
7004
7066
|
};
|
|
7005
7067
|
|
|
7068
|
+
/**
|
|
7069
|
+
* Contains the different types of market data responses that come from the server
|
|
7070
|
+
* Use this instead of Streamer.dataTypes
|
|
7071
|
+
* */
|
|
7072
|
+
_Streamer2["default"].marketDataTypes = _streamerApi.messages.market.MarketDataResponseTypes;
|
|
7073
|
+
_Streamer2["default"].marketDataTypes.get = function (msg) {
|
|
7074
|
+
var messageType = utils.getMessageName(msg);
|
|
7075
|
+
if (_Streamer2["default"].marketDataTypes[messageType]) {
|
|
7076
|
+
return messageType;
|
|
7077
|
+
} else {
|
|
7078
|
+
return "UnknownType[" + messageType + "]";
|
|
7079
|
+
}
|
|
7080
|
+
};
|
|
7081
|
+
|
|
7082
|
+
/**
|
|
7083
|
+
* Contains the different allowed subscription types.
|
|
7084
|
+
* It can be used along with the subscription requests.
|
|
7085
|
+
* For usage example:
|
|
7086
|
+
* @see subscription-example.html
|
|
7087
|
+
* */
|
|
7088
|
+
_Streamer2["default"].subscriptionTypes = _streamerApi.messages.market.SubscriptionTypes;
|
|
7089
|
+
|
|
7006
7090
|
module.exports = _Streamer2["default"];
|
|
7007
7091
|
}).call(this,require('_process'),typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {},require("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],require("timers").setImmediate,require("timers").clearImmediate,"/lib/index.js","/lib")
|
|
7008
7092
|
},{"./Streamer.js":7,"./formatting.js":13,"./polyfills":18,"./streamer-api.js":96,"./streamer-utils.js":98,"_process":119,"buffer":109,"json3":117,"timers":140}],16:[function(require,module,exports){
|
|
@@ -7072,16 +7156,16 @@ function asLogger(logger) {
|
|
|
7072
7156
|
exports.__esModule = true;
|
|
7073
7157
|
/* @see http://usejsdoc.org */
|
|
7074
7158
|
|
|
7075
|
-
/**
|
|
7076
|
-
* Streamer api namespace.
|
|
7077
|
-
* @namespace
|
|
7159
|
+
/**
|
|
7160
|
+
* Streamer api namespace.
|
|
7161
|
+
* @namespace
|
|
7078
7162
|
*/
|
|
7079
7163
|
|
|
7080
7164
|
/* ****************************************************************************************************************** */
|
|
7081
7165
|
|
|
7082
|
-
/**
|
|
7083
|
-
* Supported encodings.
|
|
7084
|
-
* @enum
|
|
7166
|
+
/**
|
|
7167
|
+
* Supported encodings.
|
|
7168
|
+
* @enum
|
|
7085
7169
|
*/
|
|
7086
7170
|
var Encodings = exports.Encodings = {
|
|
7087
7171
|
UNDEFINED: "undefined",
|
|
@@ -7094,9 +7178,9 @@ var Encodings = exports.Encodings = {
|
|
|
7094
7178
|
BASE64_CHAR: "B"
|
|
7095
7179
|
};
|
|
7096
7180
|
|
|
7097
|
-
/**
|
|
7098
|
-
* Supported mime types.
|
|
7099
|
-
* @enum
|
|
7181
|
+
/**
|
|
7182
|
+
* Supported mime types.
|
|
7183
|
+
* @enum
|
|
7100
7184
|
*/
|
|
7101
7185
|
var MimeTypes = exports.MimeTypes = {
|
|
7102
7186
|
UNDEFINED: "undefined",
|
|
@@ -7112,12 +7196,12 @@ var MimeTypes = exports.MimeTypes = {
|
|
|
7112
7196
|
QITCH_CHAR: "I"
|
|
7113
7197
|
};
|
|
7114
7198
|
|
|
7115
|
-
/**
|
|
7116
|
-
* Returns the with '0' left padded string representation of the number.
|
|
7117
|
-
* @param num {number} the number to create string for
|
|
7118
|
-
* @param len {number} the target length of the string
|
|
7119
|
-
* @return {string} the with '0' left padded string
|
|
7120
|
-
* @throws Will throw an error if number doesn't fit within target length
|
|
7199
|
+
/**
|
|
7200
|
+
* Returns the with '0' left padded string representation of the number.
|
|
7201
|
+
* @param num {number} the number to create string for
|
|
7202
|
+
* @param len {number} the target length of the string
|
|
7203
|
+
* @return {string} the with '0' left padded string
|
|
7204
|
+
* @throws Will throw an error if number doesn't fit within target length
|
|
7121
7205
|
*/
|
|
7122
7206
|
var lpad = exports.lpad = function lpad(num, len) {
|
|
7123
7207
|
var _numstr = num.toString();
|
|
@@ -7443,13 +7527,13 @@ var BIG_INT_FORTY = _jsbi2["default"].BigInt(40);
|
|
|
7443
7527
|
var BIG_INT_FORTY_EIGHT = _jsbi2["default"].BigInt(48);
|
|
7444
7528
|
var BIG_INT_FIFTY_SIX = _jsbi2["default"].BigInt(56);
|
|
7445
7529
|
|
|
7446
|
-
/*
|
|
7447
|
-
Note: QITCH is currently in a Beta phase and can potentially cause performance degradation
|
|
7530
|
+
/*
|
|
7531
|
+
Note: QITCH is currently in a Beta phase and can potentially cause performance degradation
|
|
7448
7532
|
*/
|
|
7449
|
-
/**
|
|
7450
|
-
* Translates bytes into numbers and vice versa.
|
|
7451
|
-
* Use multiplication instead of shifts because in javascript shifts are slower than multiplication
|
|
7452
|
-
* (under the hood shifts call ToInt32 which is slower than ToNumber in multiplication).
|
|
7533
|
+
/**
|
|
7534
|
+
* Translates bytes into numbers and vice versa.
|
|
7535
|
+
* Use multiplication instead of shifts because in javascript shifts are slower than multiplication
|
|
7536
|
+
* (under the hood shifts call ToInt32 which is slower than ToNumber in multiplication).
|
|
7453
7537
|
*/
|
|
7454
7538
|
|
|
7455
7539
|
var Bytes = function () {
|
|
@@ -7463,11 +7547,11 @@ var Bytes = function () {
|
|
|
7463
7547
|
return dst;
|
|
7464
7548
|
};
|
|
7465
7549
|
|
|
7466
|
-
/**
|
|
7467
|
-
* Gets numeric value that is in range of short (Int16) from byte array
|
|
7468
|
-
* @param src The source array
|
|
7469
|
-
* @param offset The offset
|
|
7470
|
-
* @returns {number} Resulting short value
|
|
7550
|
+
/**
|
|
7551
|
+
* Gets numeric value that is in range of short (Int16) from byte array
|
|
7552
|
+
* @param src The source array
|
|
7553
|
+
* @param offset The offset
|
|
7554
|
+
* @returns {number} Resulting short value
|
|
7471
7555
|
*/
|
|
7472
7556
|
|
|
7473
7557
|
|
|
@@ -7484,11 +7568,11 @@ var Bytes = function () {
|
|
|
7484
7568
|
return dst;
|
|
7485
7569
|
};
|
|
7486
7570
|
|
|
7487
|
-
/**
|
|
7488
|
-
* Gets numeric value that is in range of integer (Int32) from byte array
|
|
7489
|
-
* @param src The source array
|
|
7490
|
-
* @param offset The offset
|
|
7491
|
-
* @returns {number} Resulting int value
|
|
7571
|
+
/**
|
|
7572
|
+
* Gets numeric value that is in range of integer (Int32) from byte array
|
|
7573
|
+
* @param src The source array
|
|
7574
|
+
* @param offset The offset
|
|
7575
|
+
* @returns {number} Resulting int value
|
|
7492
7576
|
*/
|
|
7493
7577
|
|
|
7494
7578
|
|
|
@@ -7499,11 +7583,11 @@ var Bytes = function () {
|
|
|
7499
7583
|
src[offset + 3] & 0xff;
|
|
7500
7584
|
};
|
|
7501
7585
|
|
|
7502
|
-
/**
|
|
7503
|
-
* Gets numeric value that is in range of long (Int64) from byte array.
|
|
7504
|
-
* @param src The source array
|
|
7505
|
-
* @param offset The offset
|
|
7506
|
-
* @returns {JSBI} Resulting string representation of long.
|
|
7586
|
+
/**
|
|
7587
|
+
* Gets numeric value that is in range of long (Int64) from byte array.
|
|
7588
|
+
* @param src The source array
|
|
7589
|
+
* @param offset The offset
|
|
7590
|
+
* @returns {JSBI} Resulting string representation of long.
|
|
7507
7591
|
*/
|
|
7508
7592
|
|
|
7509
7593
|
|
|
@@ -7545,8 +7629,8 @@ var UShort = function () {
|
|
|
7545
7629
|
return UShort;
|
|
7546
7630
|
}();
|
|
7547
7631
|
|
|
7548
|
-
/**
|
|
7549
|
-
* Length in bytes
|
|
7632
|
+
/**
|
|
7633
|
+
* Length in bytes
|
|
7550
7634
|
*/
|
|
7551
7635
|
|
|
7552
7636
|
|
|
@@ -7576,8 +7660,8 @@ var UByte = function () {
|
|
|
7576
7660
|
return UByte;
|
|
7577
7661
|
}();
|
|
7578
7662
|
|
|
7579
|
-
/**
|
|
7580
|
-
* Length in bytes
|
|
7663
|
+
/**
|
|
7664
|
+
* Length in bytes
|
|
7581
7665
|
*/
|
|
7582
7666
|
|
|
7583
7667
|
|
|
@@ -7607,8 +7691,8 @@ var UInt = function () {
|
|
|
7607
7691
|
return UInt;
|
|
7608
7692
|
}();
|
|
7609
7693
|
|
|
7610
|
-
/**
|
|
7611
|
-
* Length in bytes
|
|
7694
|
+
/**
|
|
7695
|
+
* Length in bytes
|
|
7612
7696
|
*/
|
|
7613
7697
|
|
|
7614
7698
|
|
|
@@ -7854,24 +7938,24 @@ function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj;
|
|
|
7854
7938
|
|
|
7855
7939
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
7856
7940
|
|
|
7857
|
-
/*
|
|
7858
|
-
Note: QITCH is currently in a Beta phase and can potentially cause performance degradation
|
|
7941
|
+
/*
|
|
7942
|
+
Note: QITCH is currently in a Beta phase and can potentially cause performance degradation
|
|
7859
7943
|
*/
|
|
7860
7944
|
var Qitch = function () {
|
|
7861
7945
|
function Qitch() {
|
|
7862
7946
|
_classCallCheck(this, Qitch);
|
|
7863
7947
|
}
|
|
7864
7948
|
|
|
7865
|
-
/**
|
|
7866
|
-
* Copies an array from the specified source array, beginning at sourceIndex,
|
|
7867
|
-
* to the specified position of the destination array.
|
|
7868
|
-
* The number of components copied is equal to the length argument. The elements are copied
|
|
7869
|
-
* into a destination array starting from destinationIndex.
|
|
7870
|
-
* @param sourceArray The source array
|
|
7871
|
-
* @param sourceIndex The starting position in the source array.
|
|
7872
|
-
* @param destinationArray The destination array
|
|
7873
|
-
* @param destinationIndex The starting position in the destination array.
|
|
7874
|
-
* @param length The number of array elements to be copied.
|
|
7949
|
+
/**
|
|
7950
|
+
* Copies an array from the specified source array, beginning at sourceIndex,
|
|
7951
|
+
* to the specified position of the destination array.
|
|
7952
|
+
* The number of components copied is equal to the length argument. The elements are copied
|
|
7953
|
+
* into a destination array starting from destinationIndex.
|
|
7954
|
+
* @param sourceArray The source array
|
|
7955
|
+
* @param sourceIndex The starting position in the source array.
|
|
7956
|
+
* @param destinationArray The destination array
|
|
7957
|
+
* @param destinationIndex The starting position in the destination array.
|
|
7958
|
+
* @param length The number of array elements to be copied.
|
|
7875
7959
|
*/
|
|
7876
7960
|
Qitch.copyArray = function copyArray(sourceArray, sourceIndex, destinationArray, destinationIndex, length) {
|
|
7877
7961
|
if (length === 0) {
|
|
@@ -7898,12 +7982,12 @@ var Qitch = function () {
|
|
|
7898
7982
|
}
|
|
7899
7983
|
};
|
|
7900
7984
|
|
|
7901
|
-
/**
|
|
7902
|
-
* Gets boolean value from source byte array at specified position.
|
|
7903
|
-
* @param src The source array.
|
|
7904
|
-
* @param offset The offset.
|
|
7905
|
-
* @returns {boolean} Returns obtained value.
|
|
7906
|
-
* @throws Exception in case if src is not {@link Int8Array}
|
|
7985
|
+
/**
|
|
7986
|
+
* Gets boolean value from source byte array at specified position.
|
|
7987
|
+
* @param src The source array.
|
|
7988
|
+
* @param offset The offset.
|
|
7989
|
+
* @returns {boolean} Returns obtained value.
|
|
7990
|
+
* @throws Exception in case if src is not {@link Int8Array}
|
|
7907
7991
|
*/
|
|
7908
7992
|
|
|
7909
7993
|
|
|
@@ -7914,13 +7998,13 @@ var Qitch = function () {
|
|
|
7914
7998
|
throw "Invalid source. Expected: Int8Array";
|
|
7915
7999
|
};
|
|
7916
8000
|
|
|
7917
|
-
/**
|
|
7918
|
-
* Puts boolean value into destination array.
|
|
7919
|
-
* @param dst The destination array
|
|
7920
|
-
* @param offset The offset.
|
|
7921
|
-
* @param val Boolean value.
|
|
7922
|
-
* @returns {Int8Array} destination array.
|
|
7923
|
-
* @throws Exception in case if dst is not {@link Int8Array}
|
|
8001
|
+
/**
|
|
8002
|
+
* Puts boolean value into destination array.
|
|
8003
|
+
* @param dst The destination array
|
|
8004
|
+
* @param offset The offset.
|
|
8005
|
+
* @param val Boolean value.
|
|
8006
|
+
* @returns {Int8Array} destination array.
|
|
8007
|
+
* @throws Exception in case if dst is not {@link Int8Array}
|
|
7924
8008
|
*/
|
|
7925
8009
|
|
|
7926
8010
|
|
|
@@ -7932,13 +8016,13 @@ var Qitch = function () {
|
|
|
7932
8016
|
throw "Invalid destination. Expected: Int8Array";
|
|
7933
8017
|
};
|
|
7934
8018
|
|
|
7935
|
-
/**
|
|
7936
|
-
* Puts byte value into destination array.
|
|
7937
|
-
* @param dst The destination array
|
|
7938
|
-
* @param offset The offset.
|
|
7939
|
-
* @param val Byte value.
|
|
7940
|
-
* @returns {Int8Array} destination array.
|
|
7941
|
-
* @throws Exception in case if dst is not {@link Int8Array}
|
|
8019
|
+
/**
|
|
8020
|
+
* Puts byte value into destination array.
|
|
8021
|
+
* @param dst The destination array
|
|
8022
|
+
* @param offset The offset.
|
|
8023
|
+
* @param val Byte value.
|
|
8024
|
+
* @returns {Int8Array} destination array.
|
|
8025
|
+
* @throws Exception in case if dst is not {@link Int8Array}
|
|
7942
8026
|
*/
|
|
7943
8027
|
|
|
7944
8028
|
|
|
@@ -7950,12 +8034,12 @@ var Qitch = function () {
|
|
|
7950
8034
|
throw "Invalid destination. Expected: Int8Array";
|
|
7951
8035
|
};
|
|
7952
8036
|
|
|
7953
|
-
/**
|
|
7954
|
-
* Gets integer (int32) value from source byte array at specified position.
|
|
7955
|
-
* @param src The source array.
|
|
7956
|
-
* @param offset The offset.
|
|
7957
|
-
* @returns {number} Returns obtained value.
|
|
7958
|
-
* @throws Exception in case if src is not {@link Int8Array}
|
|
8037
|
+
/**
|
|
8038
|
+
* Gets integer (int32) value from source byte array at specified position.
|
|
8039
|
+
* @param src The source array.
|
|
8040
|
+
* @param offset The offset.
|
|
8041
|
+
* @returns {number} Returns obtained value.
|
|
8042
|
+
* @throws Exception in case if src is not {@link Int8Array}
|
|
7959
8043
|
*/
|
|
7960
8044
|
|
|
7961
8045
|
|
|
@@ -7966,13 +8050,13 @@ var Qitch = function () {
|
|
|
7966
8050
|
throw "Invalid source. Expected: Int8Array";
|
|
7967
8051
|
};
|
|
7968
8052
|
|
|
7969
|
-
/**
|
|
7970
|
-
* Sets integer (int32) value to destination array
|
|
7971
|
-
* @param dst destination array
|
|
7972
|
-
* @param offset offset
|
|
7973
|
-
* @param val integer value
|
|
7974
|
-
* @returns {Int8Array} destination array.
|
|
7975
|
-
* @throws Exception in case if dst is not {@link Int8Array}
|
|
8053
|
+
/**
|
|
8054
|
+
* Sets integer (int32) value to destination array
|
|
8055
|
+
* @param dst destination array
|
|
8056
|
+
* @param offset offset
|
|
8057
|
+
* @param val integer value
|
|
8058
|
+
* @returns {Int8Array} destination array.
|
|
8059
|
+
* @throws Exception in case if dst is not {@link Int8Array}
|
|
7976
8060
|
*/
|
|
7977
8061
|
|
|
7978
8062
|
|
|
@@ -7983,12 +8067,12 @@ var Qitch = function () {
|
|
|
7983
8067
|
throw "Invalid destination. Expected: Int8Array";
|
|
7984
8068
|
};
|
|
7985
8069
|
|
|
7986
|
-
/**
|
|
7987
|
-
* Gets unsigned integer (uint32) value from source byte array at specified position.
|
|
7988
|
-
* @param src The source array.
|
|
7989
|
-
* @param offset The offset.
|
|
7990
|
-
* @returns {number} Returns obtained value.
|
|
7991
|
-
* @throws Exception in case if src is not {@link Int8Array}
|
|
8070
|
+
/**
|
|
8071
|
+
* Gets unsigned integer (uint32) value from source byte array at specified position.
|
|
8072
|
+
* @param src The source array.
|
|
8073
|
+
* @param offset The offset.
|
|
8074
|
+
* @returns {number} Returns obtained value.
|
|
8075
|
+
* @throws Exception in case if src is not {@link Int8Array}
|
|
7992
8076
|
*/
|
|
7993
8077
|
|
|
7994
8078
|
|
|
@@ -7999,13 +8083,13 @@ var Qitch = function () {
|
|
|
7999
8083
|
throw "Invalid source. Expected: Int8Array";
|
|
8000
8084
|
};
|
|
8001
8085
|
|
|
8002
|
-
/**
|
|
8003
|
-
* Sets unsigned integer (uint32) value to destination array
|
|
8004
|
-
* @param dst destination array
|
|
8005
|
-
* @param offset offset
|
|
8006
|
-
* @param val unsigned integer value
|
|
8007
|
-
* @returns {Int8Array} destination array.
|
|
8008
|
-
* @throws Exception in case if dst is not {@link Int8Array}
|
|
8086
|
+
/**
|
|
8087
|
+
* Sets unsigned integer (uint32) value to destination array
|
|
8088
|
+
* @param dst destination array
|
|
8089
|
+
* @param offset offset
|
|
8090
|
+
* @param val unsigned integer value
|
|
8091
|
+
* @returns {Int8Array} destination array.
|
|
8092
|
+
* @throws Exception in case if dst is not {@link Int8Array}
|
|
8009
8093
|
*/
|
|
8010
8094
|
|
|
8011
8095
|
|
|
@@ -8016,13 +8100,13 @@ var Qitch = function () {
|
|
|
8016
8100
|
throw "Invalid destination. Expected: Int8Array";
|
|
8017
8101
|
};
|
|
8018
8102
|
|
|
8019
|
-
/**
|
|
8020
|
-
* Gets single character from source byte array at specified position.
|
|
8021
|
-
* @param src The source array.
|
|
8022
|
-
* @param offset The offset.
|
|
8023
|
-
* @returns {null|String} Returns null if offset is out of array index range or
|
|
8024
|
-
* value is equal to {@link Constants#ASCII_NULL}, otherwise returns the obtained value.
|
|
8025
|
-
* @throws Exception in case if src is not {@link Int8Array}
|
|
8103
|
+
/**
|
|
8104
|
+
* Gets single character from source byte array at specified position.
|
|
8105
|
+
* @param src The source array.
|
|
8106
|
+
* @param offset The offset.
|
|
8107
|
+
* @returns {null|String} Returns null if offset is out of array index range or
|
|
8108
|
+
* value is equal to {@link Constants#ASCII_NULL}, otherwise returns the obtained value.
|
|
8109
|
+
* @throws Exception in case if src is not {@link Int8Array}
|
|
8026
8110
|
*/
|
|
8027
8111
|
|
|
8028
8112
|
|
|
@@ -8037,13 +8121,13 @@ var Qitch = function () {
|
|
|
8037
8121
|
throw "Invalid source. Expected: Int8Array";
|
|
8038
8122
|
};
|
|
8039
8123
|
|
|
8040
|
-
/**
|
|
8041
|
-
* Gets long (int64) value from source byte array at specified position. Since javascript doesn't support long values,
|
|
8042
|
-
* it is returned as {@link JSBI.BigInt}.
|
|
8043
|
-
* @param src The source array.
|
|
8044
|
-
* @param offset The offset.
|
|
8045
|
-
* @returns {JSBI} Returns obtained value.
|
|
8046
|
-
* @throws Exception in case if src is not {@link Int8Array}
|
|
8124
|
+
/**
|
|
8125
|
+
* Gets long (int64) value from source byte array at specified position. Since javascript doesn't support long values,
|
|
8126
|
+
* it is returned as {@link JSBI.BigInt}.
|
|
8127
|
+
* @param src The source array.
|
|
8128
|
+
* @param offset The offset.
|
|
8129
|
+
* @returns {JSBI} Returns obtained value.
|
|
8130
|
+
* @throws Exception in case if src is not {@link Int8Array}
|
|
8047
8131
|
*/
|
|
8048
8132
|
|
|
8049
8133
|
|
|
@@ -8054,14 +8138,14 @@ var Qitch = function () {
|
|
|
8054
8138
|
throw "Invalid source. Expected: Int8Array";
|
|
8055
8139
|
};
|
|
8056
8140
|
|
|
8057
|
-
/**
|
|
8058
|
-
* Gets double value from byte source array at specified position.
|
|
8059
|
-
* In QITCH double values are sent as longs and then divided by {@link Constants#PRICE_DIVISOR}. Since javascript
|
|
8060
|
-
* doesn't support long values, the result is returned as {@link BigNumber}.
|
|
8061
|
-
* @param src The source array.
|
|
8062
|
-
* @param offset The offset.
|
|
8063
|
-
* @returns {BigNumber} Returns obtained value.
|
|
8064
|
-
* @throws Exception in case if src is not {@link Int8Array}
|
|
8141
|
+
/**
|
|
8142
|
+
* Gets double value from byte source array at specified position.
|
|
8143
|
+
* In QITCH double values are sent as longs and then divided by {@link Constants#PRICE_DIVISOR}. Since javascript
|
|
8144
|
+
* doesn't support long values, the result is returned as {@link BigNumber}.
|
|
8145
|
+
* @param src The source array.
|
|
8146
|
+
* @param offset The offset.
|
|
8147
|
+
* @returns {BigNumber} Returns obtained value.
|
|
8148
|
+
* @throws Exception in case if src is not {@link Int8Array}
|
|
8065
8149
|
*/
|
|
8066
8150
|
|
|
8067
8151
|
|
|
@@ -8072,12 +8156,12 @@ var Qitch = function () {
|
|
|
8072
8156
|
throw "Invalid source. Expected: Int8Array";
|
|
8073
8157
|
};
|
|
8074
8158
|
|
|
8075
|
-
/**
|
|
8076
|
-
* Gets signed byte from source byte array at specified position.
|
|
8077
|
-
* @param src The source array.
|
|
8078
|
-
* @param offset The offset.
|
|
8079
|
-
* @returns {number} Returns obtained value.
|
|
8080
|
-
* @throws Exception in case if src is not {@link Int8Array}
|
|
8159
|
+
/**
|
|
8160
|
+
* Gets signed byte from source byte array at specified position.
|
|
8161
|
+
* @param src The source array.
|
|
8162
|
+
* @param offset The offset.
|
|
8163
|
+
* @returns {number} Returns obtained value.
|
|
8164
|
+
* @throws Exception in case if src is not {@link Int8Array}
|
|
8081
8165
|
*/
|
|
8082
8166
|
|
|
8083
8167
|
|
|
@@ -8088,14 +8172,14 @@ var Qitch = function () {
|
|
|
8088
8172
|
throw "Invalid source. Expected: Int8Array";
|
|
8089
8173
|
};
|
|
8090
8174
|
|
|
8091
|
-
/**
|
|
8092
|
-
* Gets timestamp value from source byte array at specified offset. Since javascript doesn't support long values,
|
|
8093
|
-
* it is returned as {@link JSBI.BigInt}
|
|
8094
|
-
* @param src The source array.
|
|
8095
|
-
* @param offset The offset.
|
|
8096
|
-
* @returns {null|JSBI} Returns null if value is equal to {@link Constants#TIMESTAMP_NULL}
|
|
8097
|
-
* otherwise returns the obtained value.
|
|
8098
|
-
* @throws Exception in case if src is not {@link Int8Array}
|
|
8175
|
+
/**
|
|
8176
|
+
* Gets timestamp value from source byte array at specified offset. Since javascript doesn't support long values,
|
|
8177
|
+
* it is returned as {@link JSBI.BigInt}
|
|
8178
|
+
* @param src The source array.
|
|
8179
|
+
* @param offset The offset.
|
|
8180
|
+
* @returns {null|JSBI} Returns null if value is equal to {@link Constants#TIMESTAMP_NULL}
|
|
8181
|
+
* otherwise returns the obtained value.
|
|
8182
|
+
* @throws Exception in case if src is not {@link Int8Array}
|
|
8099
8183
|
*/
|
|
8100
8184
|
|
|
8101
8185
|
|
|
@@ -8107,12 +8191,12 @@ var Qitch = function () {
|
|
|
8107
8191
|
throw "Invalid source. Expected: Int8Array";
|
|
8108
8192
|
};
|
|
8109
8193
|
|
|
8110
|
-
/**
|
|
8111
|
-
* Gets locate code value from source byte array at specified offset.
|
|
8112
|
-
* @param src The source array.
|
|
8113
|
-
* @param offset The offset.
|
|
8114
|
-
* @returns {number} Returns obtained value.
|
|
8115
|
-
* @throws Exception in case if src is not {@link Int8Array}
|
|
8194
|
+
/**
|
|
8195
|
+
* Gets locate code value from source byte array at specified offset.
|
|
8196
|
+
* @param src The source array.
|
|
8197
|
+
* @param offset The offset.
|
|
8198
|
+
* @returns {number} Returns obtained value.
|
|
8199
|
+
* @throws Exception in case if src is not {@link Int8Array}
|
|
8116
8200
|
*/
|
|
8117
8201
|
|
|
8118
8202
|
|
|
@@ -8123,13 +8207,13 @@ var Qitch = function () {
|
|
|
8123
8207
|
throw "Invalid source. Expected: Int8Array";
|
|
8124
8208
|
};
|
|
8125
8209
|
|
|
8126
|
-
/**
|
|
8127
|
-
* Gets symbol value from source byte array at specified offset.
|
|
8128
|
-
* @param src The source array.
|
|
8129
|
-
* @param offset The offset.
|
|
8130
|
-
* @returns {null|String} Returns null in case if specified offset is too big (offset + symbol length in bytes is bigger than length of source array),
|
|
8131
|
-
* otherwise returns obtained value.
|
|
8132
|
-
* @throws Exception in case if src is not {@link Int8Array}
|
|
8210
|
+
/**
|
|
8211
|
+
* Gets symbol value from source byte array at specified offset.
|
|
8212
|
+
* @param src The source array.
|
|
8213
|
+
* @param offset The offset.
|
|
8214
|
+
* @returns {null|String} Returns null in case if specified offset is too big (offset + symbol length in bytes is bigger than length of source array),
|
|
8215
|
+
* otherwise returns obtained value.
|
|
8216
|
+
* @throws Exception in case if src is not {@link Int8Array}
|
|
8133
8217
|
*/
|
|
8134
8218
|
|
|
8135
8219
|
|
|
@@ -8143,13 +8227,13 @@ var Qitch = function () {
|
|
|
8143
8227
|
throw "Invalid source. Expected: Int8Array";
|
|
8144
8228
|
};
|
|
8145
8229
|
|
|
8146
|
-
/**
|
|
8147
|
-
* Puts symbol value into destination array.
|
|
8148
|
-
* @param dst The destination array.
|
|
8149
|
-
* @param offset The offset.
|
|
8150
|
-
* @param val Symbol value.
|
|
8151
|
-
* @returns {Int8Array} destination array.
|
|
8152
|
-
* @throws Exception in case if dst is not {@link Int8Array}
|
|
8230
|
+
/**
|
|
8231
|
+
* Puts symbol value into destination array.
|
|
8232
|
+
* @param dst The destination array.
|
|
8233
|
+
* @param offset The offset.
|
|
8234
|
+
* @param val Symbol value.
|
|
8235
|
+
* @returns {Int8Array} destination array.
|
|
8236
|
+
* @throws Exception in case if dst is not {@link Int8Array}
|
|
8153
8237
|
*/
|
|
8154
8238
|
|
|
8155
8239
|
|
|
@@ -8160,13 +8244,13 @@ var Qitch = function () {
|
|
|
8160
8244
|
throw "Invalid destination. Expected: Int8Array";
|
|
8161
8245
|
};
|
|
8162
8246
|
|
|
8163
|
-
/**
|
|
8164
|
-
* Gets excode value from source byte array at specified offset.
|
|
8165
|
-
* @param src The source array.
|
|
8166
|
-
* @param offset The offset.
|
|
8167
|
-
* @returns {null|String} Returns null in case if specified offset is too big (offset + excode length in bytes is bigger than length of source array),
|
|
8168
|
-
* otherwise returns obtained value.
|
|
8169
|
-
* @throws Exception in case if src is not {@link Int8Array}
|
|
8247
|
+
/**
|
|
8248
|
+
* Gets excode value from source byte array at specified offset.
|
|
8249
|
+
* @param src The source array.
|
|
8250
|
+
* @param offset The offset.
|
|
8251
|
+
* @returns {null|String} Returns null in case if specified offset is too big (offset + excode length in bytes is bigger than length of source array),
|
|
8252
|
+
* otherwise returns obtained value.
|
|
8253
|
+
* @throws Exception in case if src is not {@link Int8Array}
|
|
8170
8254
|
*/
|
|
8171
8255
|
|
|
8172
8256
|
|
|
@@ -8180,13 +8264,13 @@ var Qitch = function () {
|
|
|
8180
8264
|
throw "Invalid source. Expected: Int8Array";
|
|
8181
8265
|
};
|
|
8182
8266
|
|
|
8183
|
-
/**
|
|
8184
|
-
* Gets mmid value from source byte array at specified offset.
|
|
8185
|
-
* @param src The source array.
|
|
8186
|
-
* @param offset The offset.
|
|
8187
|
-
* @returns {null|String} Returns null in case if specified offset is too big (offset + excode length in bytes is bigger than length of source array),
|
|
8188
|
-
* otherwise returns obtained value.
|
|
8189
|
-
* @throws Exception in case if src is not {@link Int8Array}
|
|
8267
|
+
/**
|
|
8268
|
+
* Gets mmid value from source byte array at specified offset.
|
|
8269
|
+
* @param src The source array.
|
|
8270
|
+
* @param offset The offset.
|
|
8271
|
+
* @returns {null|String} Returns null in case if specified offset is too big (offset + excode length in bytes is bigger than length of source array),
|
|
8272
|
+
* otherwise returns obtained value.
|
|
8273
|
+
* @throws Exception in case if src is not {@link Int8Array}
|
|
8190
8274
|
*/
|
|
8191
8275
|
|
|
8192
8276
|
|
|
@@ -8200,13 +8284,13 @@ var Qitch = function () {
|
|
|
8200
8284
|
throw "Invalid source. Expected: Int8Array";
|
|
8201
8285
|
};
|
|
8202
8286
|
|
|
8203
|
-
/**
|
|
8204
|
-
* Gets numeric order id value from source byte array at specified offset. Since javascript doesn't support long values,
|
|
8205
|
-
* it is returned as {@link JSBI.BigInt}
|
|
8206
|
-
* @param src The source array.
|
|
8207
|
-
* @param offset The offset.
|
|
8208
|
-
* @returns {JSBI} Returns obtained value.
|
|
8209
|
-
* @throws Exception in case if src is not {@link Int8Array}
|
|
8287
|
+
/**
|
|
8288
|
+
* Gets numeric order id value from source byte array at specified offset. Since javascript doesn't support long values,
|
|
8289
|
+
* it is returned as {@link JSBI.BigInt}
|
|
8290
|
+
* @param src The source array.
|
|
8291
|
+
* @param offset The offset.
|
|
8292
|
+
* @returns {JSBI} Returns obtained value.
|
|
8293
|
+
* @throws Exception in case if src is not {@link Int8Array}
|
|
8210
8294
|
*/
|
|
8211
8295
|
|
|
8212
8296
|
|
|
@@ -8217,13 +8301,13 @@ var Qitch = function () {
|
|
|
8217
8301
|
throw "Invalid source. Expected: Int8Array";
|
|
8218
8302
|
};
|
|
8219
8303
|
|
|
8220
|
-
/**
|
|
8221
|
-
* Gets order id as string from source byte array at specified offset.
|
|
8222
|
-
* @param src The source array.
|
|
8223
|
-
* @param offset The offset.
|
|
8224
|
-
* @returns {null|String} Returns null in case if specified offset is too big (offset + order id length in bytes is bigger than length of source array),
|
|
8225
|
-
* otherwise returns obtained value.
|
|
8226
|
-
* @throws Exception in case if src is not {@link Int8Array}
|
|
8304
|
+
/**
|
|
8305
|
+
* Gets order id as string from source byte array at specified offset.
|
|
8306
|
+
* @param src The source array.
|
|
8307
|
+
* @param offset The offset.
|
|
8308
|
+
* @returns {null|String} Returns null in case if specified offset is too big (offset + order id length in bytes is bigger than length of source array),
|
|
8309
|
+
* otherwise returns obtained value.
|
|
8310
|
+
* @throws Exception in case if src is not {@link Int8Array}
|
|
8227
8311
|
*/
|
|
8228
8312
|
|
|
8229
8313
|
|
|
@@ -8237,13 +8321,13 @@ var Qitch = function () {
|
|
|
8237
8321
|
throw "Invalid source. Expected: Int8Array";
|
|
8238
8322
|
};
|
|
8239
8323
|
|
|
8240
|
-
/**
|
|
8241
|
-
* Gets currency id from source byte array at specified offset.
|
|
8242
|
-
* @param src The source array.
|
|
8243
|
-
* @param offset The offset.
|
|
8244
|
-
* @returns {null|String} Returns null in case if specified offset is too big (offset + currency id length in bytes is bigger than length of source array),
|
|
8245
|
-
* otherwise returns obtained value.
|
|
8246
|
-
* @throws Exception in case if src is not {@link Int8Array}
|
|
8324
|
+
/**
|
|
8325
|
+
* Gets currency id from source byte array at specified offset.
|
|
8326
|
+
* @param src The source array.
|
|
8327
|
+
* @param offset The offset.
|
|
8328
|
+
* @returns {null|String} Returns null in case if specified offset is too big (offset + currency id length in bytes is bigger than length of source array),
|
|
8329
|
+
* otherwise returns obtained value.
|
|
8330
|
+
* @throws Exception in case if src is not {@link Int8Array}
|
|
8247
8331
|
*/
|
|
8248
8332
|
|
|
8249
8333
|
|
|
@@ -8257,13 +8341,13 @@ var Qitch = function () {
|
|
|
8257
8341
|
throw "Invalid source. Expected: Int8Array";
|
|
8258
8342
|
};
|
|
8259
8343
|
|
|
8260
|
-
/**
|
|
8261
|
-
* Gets tick from source byte array at specified offset.
|
|
8262
|
-
* @param src The source array.
|
|
8263
|
-
* @param offset The offset.
|
|
8264
|
-
* @returns {string|null} Returns null in case if offset is out of array index range,
|
|
8265
|
-
* otherwise character at specified offset is returned.
|
|
8266
|
-
* @throws Exception in case if src is not {@link Int8Array}
|
|
8344
|
+
/**
|
|
8345
|
+
* Gets tick from source byte array at specified offset.
|
|
8346
|
+
* @param src The source array.
|
|
8347
|
+
* @param offset The offset.
|
|
8348
|
+
* @returns {string|null} Returns null in case if offset is out of array index range,
|
|
8349
|
+
* otherwise character at specified offset is returned.
|
|
8350
|
+
* @throws Exception in case if src is not {@link Int8Array}
|
|
8267
8351
|
*/
|
|
8268
8352
|
|
|
8269
8353
|
|
|
@@ -8277,13 +8361,13 @@ var Qitch = function () {
|
|
|
8277
8361
|
throw "Invalid source. Expected: Int8Array";
|
|
8278
8362
|
};
|
|
8279
8363
|
|
|
8280
|
-
/**
|
|
8281
|
-
* Gets order change type from source byte array at specified offset.
|
|
8282
|
-
* @param src The source array.
|
|
8283
|
-
* @param offset The offset.
|
|
8284
|
-
* @returns {null|*} Returns null in case if offset is out of array index range,
|
|
8285
|
-
* otherwise {@link messages.market.OrderChangeType} value that corresponds to the character at specified offset is returned.
|
|
8286
|
-
* @throws Exception in case if src is not {@link Int8Array}
|
|
8364
|
+
/**
|
|
8365
|
+
* Gets order change type from source byte array at specified offset.
|
|
8366
|
+
* @param src The source array.
|
|
8367
|
+
* @param offset The offset.
|
|
8368
|
+
* @returns {null|*} Returns null in case if offset is out of array index range,
|
|
8369
|
+
* otherwise {@link messages.market.OrderChangeType} value that corresponds to the character at specified offset is returned.
|
|
8370
|
+
* @throws Exception in case if src is not {@link Int8Array}
|
|
8287
8371
|
*/
|
|
8288
8372
|
|
|
8289
8373
|
|
|
@@ -8301,13 +8385,13 @@ var Qitch = function () {
|
|
|
8301
8385
|
throw "Invalid source. Expected: Int8Array";
|
|
8302
8386
|
};
|
|
8303
8387
|
|
|
8304
|
-
/**
|
|
8305
|
-
* Gets order side from source byte array at specified offset.
|
|
8306
|
-
* @param src The source array.
|
|
8307
|
-
* @param offset The offset.
|
|
8308
|
-
* @returns {string|null} Returns null in case if offset is out of array index range,
|
|
8309
|
-
* otherwise character at specified offset is returned.
|
|
8310
|
-
* @throws Exception in case if src is not {@link Int8Array}
|
|
8388
|
+
/**
|
|
8389
|
+
* Gets order side from source byte array at specified offset.
|
|
8390
|
+
* @param src The source array.
|
|
8391
|
+
* @param offset The offset.
|
|
8392
|
+
* @returns {string|null} Returns null in case if offset is out of array index range,
|
|
8393
|
+
* otherwise character at specified offset is returned.
|
|
8394
|
+
* @throws Exception in case if src is not {@link Int8Array}
|
|
8311
8395
|
*/
|
|
8312
8396
|
|
|
8313
8397
|
|
|
@@ -8325,13 +8409,13 @@ var Qitch = function () {
|
|
|
8325
8409
|
throw "Invalid source. Expected: Int8Array";
|
|
8326
8410
|
};
|
|
8327
8411
|
|
|
8328
|
-
/**
|
|
8329
|
-
* Gets range indicator from source byte array at specified offset.
|
|
8330
|
-
* @param src The source array.
|
|
8331
|
-
* @param offset The offset.
|
|
8332
|
-
* @returns {string|null} Returns null in case if offset is out of array index range,
|
|
8333
|
-
* otherwise character at specified offset is returned.
|
|
8334
|
-
* @throws Exception in case if src is not {@link Int8Array}
|
|
8412
|
+
/**
|
|
8413
|
+
* Gets range indicator from source byte array at specified offset.
|
|
8414
|
+
* @param src The source array.
|
|
8415
|
+
* @param offset The offset.
|
|
8416
|
+
* @returns {string|null} Returns null in case if offset is out of array index range,
|
|
8417
|
+
* otherwise character at specified offset is returned.
|
|
8418
|
+
* @throws Exception in case if src is not {@link Int8Array}
|
|
8335
8419
|
*/
|
|
8336
8420
|
|
|
8337
8421
|
|
|
@@ -8345,13 +8429,13 @@ var Qitch = function () {
|
|
|
8345
8429
|
throw "Invalid source. Expected: Int8Array";
|
|
8346
8430
|
};
|
|
8347
8431
|
|
|
8348
|
-
/**
|
|
8349
|
-
* Gets instrument type from source byte array at specified offset.
|
|
8350
|
-
* @param src The source array.
|
|
8351
|
-
* @param offset The offset.
|
|
8352
|
-
* @returns {null|*} Returns null in case if offset is out of array index range,
|
|
8353
|
-
* otherwise {@link messages.market.InstrumentType} value that corresponds to the byte at specified offset is returned.
|
|
8354
|
-
* @throws Exception in case if src is not {@link Int8Array}
|
|
8432
|
+
/**
|
|
8433
|
+
* Gets instrument type from source byte array at specified offset.
|
|
8434
|
+
* @param src The source array.
|
|
8435
|
+
* @param offset The offset.
|
|
8436
|
+
* @returns {null|*} Returns null in case if offset is out of array index range,
|
|
8437
|
+
* otherwise {@link messages.market.InstrumentType} value that corresponds to the byte at specified offset is returned.
|
|
8438
|
+
* @throws Exception in case if src is not {@link Int8Array}
|
|
8355
8439
|
*/
|
|
8356
8440
|
|
|
8357
8441
|
|
|
@@ -8365,13 +8449,13 @@ var Qitch = function () {
|
|
|
8365
8449
|
throw "Invalid source. Expected: Int8Array";
|
|
8366
8450
|
};
|
|
8367
8451
|
|
|
8368
|
-
/**
|
|
8369
|
-
* Gets imbalance type from source byte array at specified offset.
|
|
8370
|
-
* @param src The source array.
|
|
8371
|
-
* @param offset The offset.
|
|
8372
|
-
* @returns {null|*} Returns null in case if offset is out of array index range,
|
|
8373
|
-
* otherwise {@link messages.market.ImbalanceType} value that corresponds to the byte at specified offset is returned.
|
|
8374
|
-
* @throws Exception in case if src is not {@link Int8Array}
|
|
8452
|
+
/**
|
|
8453
|
+
* Gets imbalance type from source byte array at specified offset.
|
|
8454
|
+
* @param src The source array.
|
|
8455
|
+
* @param offset The offset.
|
|
8456
|
+
* @returns {null|*} Returns null in case if offset is out of array index range,
|
|
8457
|
+
* otherwise {@link messages.market.ImbalanceType} value that corresponds to the byte at specified offset is returned.
|
|
8458
|
+
* @throws Exception in case if src is not {@link Int8Array}
|
|
8375
8459
|
*/
|
|
8376
8460
|
|
|
8377
8461
|
|
|
@@ -8385,13 +8469,13 @@ var Qitch = function () {
|
|
|
8385
8469
|
throw "Invalid source. Expected: Int8Array";
|
|
8386
8470
|
};
|
|
8387
8471
|
|
|
8388
|
-
/**
|
|
8389
|
-
* Gets order refernece from source byte array at specified offset.
|
|
8390
|
-
* @param src The source array.
|
|
8391
|
-
* @param offset The offset.
|
|
8392
|
-
* @returns {null|String} Returns null in case if specified offset is too big (offset + order reference length in bytes is bigger than length of source array),
|
|
8393
|
-
* otherwise returns obtained value.
|
|
8394
|
-
* @throws Exception in case if src is not {@link Int8Array}
|
|
8472
|
+
/**
|
|
8473
|
+
* Gets order refernece from source byte array at specified offset.
|
|
8474
|
+
* @param src The source array.
|
|
8475
|
+
* @param offset The offset.
|
|
8476
|
+
* @returns {null|String} Returns null in case if specified offset is too big (offset + order reference length in bytes is bigger than length of source array),
|
|
8477
|
+
* otherwise returns obtained value.
|
|
8478
|
+
* @throws Exception in case if src is not {@link Int8Array}
|
|
8395
8479
|
*/
|
|
8396
8480
|
|
|
8397
8481
|
|
|
@@ -8405,13 +8489,13 @@ var Qitch = function () {
|
|
|
8405
8489
|
throw "Invalid source. Expected: Int8Array";
|
|
8406
8490
|
};
|
|
8407
8491
|
|
|
8408
|
-
/**
|
|
8409
|
-
* Gets response reason from source byte array at specified offset.
|
|
8410
|
-
* @param src The source array.
|
|
8411
|
-
* @param offset The offset.
|
|
8412
|
-
* @returns {null|String} Returns null in case if specified offset is too big (offset + reason length in bytes is bigger than length of source array),
|
|
8413
|
-
* otherwise returns obtained value.
|
|
8414
|
-
* @throws Exception in case if src is not {@link Int8Array}
|
|
8492
|
+
/**
|
|
8493
|
+
* Gets response reason from source byte array at specified offset.
|
|
8494
|
+
* @param src The source array.
|
|
8495
|
+
* @param offset The offset.
|
|
8496
|
+
* @returns {null|String} Returns null in case if specified offset is too big (offset + reason length in bytes is bigger than length of source array),
|
|
8497
|
+
* otherwise returns obtained value.
|
|
8498
|
+
* @throws Exception in case if src is not {@link Int8Array}
|
|
8415
8499
|
*/
|
|
8416
8500
|
|
|
8417
8501
|
|
|
@@ -8425,13 +8509,13 @@ var Qitch = function () {
|
|
|
8425
8509
|
throw "Invalid source. Expected: Int8Array";
|
|
8426
8510
|
};
|
|
8427
8511
|
|
|
8428
|
-
/**
|
|
8429
|
-
* Gets streamer version from source byte array at specified offset.
|
|
8430
|
-
* @param src The source array.
|
|
8431
|
-
* @param offset The offset.
|
|
8432
|
-
* @returns {null|String} Returns null in case if specified offset is too big (offset + version length in bytes is bigger than length of source array),
|
|
8433
|
-
* otherwise returns obtained value.
|
|
8434
|
-
* @throws Exception in case if src is not {@link Int8Array}
|
|
8512
|
+
/**
|
|
8513
|
+
* Gets streamer version from source byte array at specified offset.
|
|
8514
|
+
* @param src The source array.
|
|
8515
|
+
* @param offset The offset.
|
|
8516
|
+
* @returns {null|String} Returns null in case if specified offset is too big (offset + version length in bytes is bigger than length of source array),
|
|
8517
|
+
* otherwise returns obtained value.
|
|
8518
|
+
* @throws Exception in case if src is not {@link Int8Array}
|
|
8435
8519
|
*/
|
|
8436
8520
|
|
|
8437
8521
|
|
|
@@ -8445,13 +8529,13 @@ var Qitch = function () {
|
|
|
8445
8529
|
throw "Invalid source. Expected: Int8Array";
|
|
8446
8530
|
};
|
|
8447
8531
|
|
|
8448
|
-
/**
|
|
8449
|
-
* Gets server instance from source byte array at specified offset.
|
|
8450
|
-
* @param src The source array.
|
|
8451
|
-
* @param offset The offset.
|
|
8452
|
-
* @returns {null|String} Returns null in case if specified offset is too big (offset + server instance length in bytes is bigger than length of source array),
|
|
8453
|
-
* otherwise returns obtained value.
|
|
8454
|
-
* @throws Exception in case if src is not {@link Int8Array}
|
|
8532
|
+
/**
|
|
8533
|
+
* Gets server instance from source byte array at specified offset.
|
|
8534
|
+
* @param src The source array.
|
|
8535
|
+
* @param offset The offset.
|
|
8536
|
+
* @returns {null|String} Returns null in case if specified offset is too big (offset + server instance length in bytes is bigger than length of source array),
|
|
8537
|
+
* otherwise returns obtained value.
|
|
8538
|
+
* @throws Exception in case if src is not {@link Int8Array}
|
|
8455
8539
|
*/
|
|
8456
8540
|
|
|
8457
8541
|
|
|
@@ -8465,13 +8549,13 @@ var Qitch = function () {
|
|
|
8465
8549
|
throw "Invalid source. Expected: Int8Array";
|
|
8466
8550
|
};
|
|
8467
8551
|
|
|
8468
|
-
/**
|
|
8469
|
-
* Gets the note message from source byte array at specified offset.
|
|
8470
|
-
* @param src The source array.
|
|
8471
|
-
* @param offset The offset.
|
|
8472
|
-
* @returns {null|String} Returns null in case if specified offset is too big (offset + note length in bytes is bigger than length of source array),
|
|
8473
|
-
* otherwise returns obtained value.
|
|
8474
|
-
* @throws Exception in case if src is not {@link Int8Array}
|
|
8552
|
+
/**
|
|
8553
|
+
* Gets the note message from source byte array at specified offset.
|
|
8554
|
+
* @param src The source array.
|
|
8555
|
+
* @param offset The offset.
|
|
8556
|
+
* @returns {null|String} Returns null in case if specified offset is too big (offset + note length in bytes is bigger than length of source array),
|
|
8557
|
+
* otherwise returns obtained value.
|
|
8558
|
+
* @throws Exception in case if src is not {@link Int8Array}
|
|
8475
8559
|
*/
|
|
8476
8560
|
|
|
8477
8561
|
|
|
@@ -8485,13 +8569,13 @@ var Qitch = function () {
|
|
|
8485
8569
|
throw "Invalid source. Expected: Int8Array";
|
|
8486
8570
|
};
|
|
8487
8571
|
|
|
8488
|
-
/**
|
|
8489
|
-
* Puts action value into destination array.
|
|
8490
|
-
* @param dst The destination array.
|
|
8491
|
-
* @param offset The offset.
|
|
8492
|
-
* @param val Action value.
|
|
8493
|
-
* @returns {Int8Array} destination array.
|
|
8494
|
-
* @throws Exception in case if dst is not {@link Int8Array}
|
|
8572
|
+
/**
|
|
8573
|
+
* Puts action value into destination array.
|
|
8574
|
+
* @param dst The destination array.
|
|
8575
|
+
* @param offset The offset.
|
|
8576
|
+
* @param val Action value.
|
|
8577
|
+
* @returns {Int8Array} destination array.
|
|
8578
|
+
* @throws Exception in case if dst is not {@link Int8Array}
|
|
8495
8579
|
*/
|
|
8496
8580
|
|
|
8497
8581
|
|
|
@@ -8503,13 +8587,13 @@ var Qitch = function () {
|
|
|
8503
8587
|
throw "Invalid destination. Expected: Int8Array";
|
|
8504
8588
|
};
|
|
8505
8589
|
|
|
8506
|
-
/**
|
|
8507
|
-
* Puts mimetype value into destination array.
|
|
8508
|
-
* @param dst The destination array.
|
|
8509
|
-
* @param offset The offset.
|
|
8510
|
-
* @param val Mimetype value.
|
|
8511
|
-
* @returns {Int8Array} destination array.
|
|
8512
|
-
* @throws Exception in case if dst is not {@link Int8Array}
|
|
8590
|
+
/**
|
|
8591
|
+
* Puts mimetype value into destination array.
|
|
8592
|
+
* @param dst The destination array.
|
|
8593
|
+
* @param offset The offset.
|
|
8594
|
+
* @param val Mimetype value.
|
|
8595
|
+
* @returns {Int8Array} destination array.
|
|
8596
|
+
* @throws Exception in case if dst is not {@link Int8Array}
|
|
8513
8597
|
*/
|
|
8514
8598
|
|
|
8515
8599
|
|
|
@@ -8520,13 +8604,13 @@ var Qitch = function () {
|
|
|
8520
8604
|
throw "Invalid destination. Expected: Int8Array";
|
|
8521
8605
|
};
|
|
8522
8606
|
|
|
8523
|
-
/**
|
|
8524
|
-
* Puts conflation value into destination array. If conflation is null, -1 will be put instead.
|
|
8525
|
-
* @param dst The destination array.
|
|
8526
|
-
* @param offset The offset.
|
|
8527
|
-
* @param val Conflation value.
|
|
8528
|
-
* @returns {Int8Array} destination array.
|
|
8529
|
-
* @throws Exception in case if dst is not {@link Int8Array}
|
|
8607
|
+
/**
|
|
8608
|
+
* Puts conflation value into destination array. If conflation is null, -1 will be put instead.
|
|
8609
|
+
* @param dst The destination array.
|
|
8610
|
+
* @param offset The offset.
|
|
8611
|
+
* @param val Conflation value.
|
|
8612
|
+
* @returns {Int8Array} destination array.
|
|
8613
|
+
* @throws Exception in case if dst is not {@link Int8Array}
|
|
8530
8614
|
*/
|
|
8531
8615
|
|
|
8532
8616
|
|
|
@@ -8537,13 +8621,13 @@ var Qitch = function () {
|
|
|
8537
8621
|
throw "Invalid destination. Expected: Int8Array";
|
|
8538
8622
|
};
|
|
8539
8623
|
|
|
8540
|
-
/**
|
|
8541
|
-
* Gets marketdata type from source byte array at specified offset.
|
|
8542
|
-
* @param src The source array.
|
|
8543
|
-
* @param offset The offset.
|
|
8544
|
-
* @returns {null|String} Returns null in case if offset is out of array index range,
|
|
8545
|
-
* otherwise {@link messages.control.MarketdataType} value that corresponds to the byte at specified offset is returned.
|
|
8546
|
-
* @throws Exception in case if src is not {@link Int8Array}
|
|
8624
|
+
/**
|
|
8625
|
+
* Gets marketdata type from source byte array at specified offset.
|
|
8626
|
+
* @param src The source array.
|
|
8627
|
+
* @param offset The offset.
|
|
8628
|
+
* @returns {null|String} Returns null in case if offset is out of array index range,
|
|
8629
|
+
* otherwise {@link messages.control.MarketdataType} value that corresponds to the byte at specified offset is returned.
|
|
8630
|
+
* @throws Exception in case if src is not {@link Int8Array}
|
|
8547
8631
|
*/
|
|
8548
8632
|
|
|
8549
8633
|
|
|
@@ -8557,13 +8641,13 @@ var Qitch = function () {
|
|
|
8557
8641
|
throw "Invalid source. Expected: Int8Array";
|
|
8558
8642
|
};
|
|
8559
8643
|
|
|
8560
|
-
/**
|
|
8561
|
-
* Puts marketdata type value into destination array.
|
|
8562
|
-
* @param dst The destination array.
|
|
8563
|
-
* @param offset The offset.
|
|
8564
|
-
* @param val Marketdatatype value.
|
|
8565
|
-
* @returns {Int8Array} destination array.
|
|
8566
|
-
* @throws Exception in case if dst is not {@link Int8Array}
|
|
8644
|
+
/**
|
|
8645
|
+
* Puts marketdata type value into destination array.
|
|
8646
|
+
* @param dst The destination array.
|
|
8647
|
+
* @param offset The offset.
|
|
8648
|
+
* @param val Marketdatatype value.
|
|
8649
|
+
* @returns {Int8Array} destination array.
|
|
8650
|
+
* @throws Exception in case if dst is not {@link Int8Array}
|
|
8567
8651
|
*/
|
|
8568
8652
|
|
|
8569
8653
|
|
|
@@ -8575,13 +8659,13 @@ var Qitch = function () {
|
|
|
8575
8659
|
throw "Invalid destination. Expected: Int8Array";
|
|
8576
8660
|
};
|
|
8577
8661
|
|
|
8578
|
-
/**
|
|
8579
|
-
* Gets entitlement type from source byte array at specified offset.
|
|
8580
|
-
* @param src The source array.
|
|
8581
|
-
* @param offset The offset.
|
|
8582
|
-
* @returns {null|String} Returns null in case if offset is out of array index range,
|
|
8583
|
-
* otherwise {@link messages.control.StreamEntitlementType} value that corresponds to the byte at specified offset is returned.
|
|
8584
|
-
* @throws Exception in case if src is not {@link Int8Array}
|
|
8662
|
+
/**
|
|
8663
|
+
* Gets entitlement type from source byte array at specified offset.
|
|
8664
|
+
* @param src The source array.
|
|
8665
|
+
* @param offset The offset.
|
|
8666
|
+
* @returns {null|String} Returns null in case if offset is out of array index range,
|
|
8667
|
+
* otherwise {@link messages.control.StreamEntitlementType} value that corresponds to the byte at specified offset is returned.
|
|
8668
|
+
* @throws Exception in case if src is not {@link Int8Array}
|
|
8585
8669
|
*/
|
|
8586
8670
|
|
|
8587
8671
|
|
|
@@ -8595,12 +8679,12 @@ var Qitch = function () {
|
|
|
8595
8679
|
throw "Invalid source. Expected: Int8Array";
|
|
8596
8680
|
};
|
|
8597
8681
|
|
|
8598
|
-
/**
|
|
8599
|
-
* Gets stream entitlement entry from source byte array at specified offset.
|
|
8600
|
-
* @param src The source array.
|
|
8601
|
-
* @param offset The offset.
|
|
8602
|
-
* @returns {messages.control.StreamEntitlement}
|
|
8603
|
-
* @throws Exception in case if src is not {@link Int8Array}
|
|
8682
|
+
/**
|
|
8683
|
+
* Gets stream entitlement entry from source byte array at specified offset.
|
|
8684
|
+
* @param src The source array.
|
|
8685
|
+
* @param offset The offset.
|
|
8686
|
+
* @returns {messages.control.StreamEntitlement}
|
|
8687
|
+
* @throws Exception in case if src is not {@link Int8Array}
|
|
8604
8688
|
*/
|
|
8605
8689
|
|
|
8606
8690
|
|
|
@@ -8633,8 +8717,8 @@ var _jsbi2 = _interopRequireDefault(_jsbi);
|
|
|
8633
8717
|
|
|
8634
8718
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
8635
8719
|
|
|
8636
|
-
/*
|
|
8637
|
-
Note: QITCH is currently in a Beta phase and can potentially cause performance degradation
|
|
8720
|
+
/*
|
|
8721
|
+
Note: QITCH is currently in a Beta phase and can potentially cause performance degradation
|
|
8638
8722
|
*/
|
|
8639
8723
|
var ASCII_NULL = exports.ASCII_NULL = 0;
|
|
8640
8724
|
var ASCIICHAR_NULL = exports.ASCIICHAR_NULL = '0';
|
|
@@ -8915,9 +8999,9 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "d
|
|
|
8915
8999
|
|
|
8916
9000
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
8917
9001
|
|
|
8918
|
-
/**
|
|
8919
|
-
* Decodes a stream of message blocks into messages.
|
|
8920
|
-
* This class is stateful and cannot be shared between multiple streams.
|
|
9002
|
+
/**
|
|
9003
|
+
* Decodes a stream of message blocks into messages.
|
|
9004
|
+
* This class is stateful and cannot be shared between multiple streams.
|
|
8921
9005
|
*/
|
|
8922
9006
|
var BlockDecoder = function () {
|
|
8923
9007
|
function BlockDecoder(decoders, capacity) {
|
|
@@ -8939,9 +9023,9 @@ var BlockDecoder = function () {
|
|
|
8939
9023
|
this.doflip = false;
|
|
8940
9024
|
}
|
|
8941
9025
|
|
|
8942
|
-
/**
|
|
8943
|
-
* The number of messages in the current block.
|
|
8944
|
-
* @returns {number} The number of messages or -1 if no block is being decoded
|
|
9026
|
+
/**
|
|
9027
|
+
* The number of messages in the current block.
|
|
9028
|
+
* @returns {number} The number of messages or -1 if no block is being decoded
|
|
8945
9029
|
*/
|
|
8946
9030
|
|
|
8947
9031
|
|
|
@@ -8949,9 +9033,9 @@ var BlockDecoder = function () {
|
|
|
8949
9033
|
return this.state.messagecount;
|
|
8950
9034
|
};
|
|
8951
9035
|
|
|
8952
|
-
/**
|
|
8953
|
-
* Returns the sequence number of the current block.
|
|
8954
|
-
* @returns {number} the sequence number of the current block.
|
|
9036
|
+
/**
|
|
9037
|
+
* Returns the sequence number of the current block.
|
|
9038
|
+
* @returns {number} the sequence number of the current block.
|
|
8955
9039
|
*/
|
|
8956
9040
|
|
|
8957
9041
|
|
|
@@ -8959,13 +9043,13 @@ var BlockDecoder = function () {
|
|
|
8959
9043
|
return this.state.blocksequencenumber;
|
|
8960
9044
|
};
|
|
8961
9045
|
|
|
8962
|
-
/**
|
|
8963
|
-
* Adds bytes to internal buffer.
|
|
8964
|
-
* Call {@link decode} to decode the buffered data.
|
|
8965
|
-
* @param bytes The array from witch bytes are to be added.
|
|
8966
|
-
* @param offset The offset within the array of the fist byte to be added.
|
|
8967
|
-
* @param length The number of bytes to be added from the given array.
|
|
8968
|
-
* @returns {Number} Number of bytes that weren't added due to buffer not having enough space.
|
|
9046
|
+
/**
|
|
9047
|
+
* Adds bytes to internal buffer.
|
|
9048
|
+
* Call {@link decode} to decode the buffered data.
|
|
9049
|
+
* @param bytes The array from witch bytes are to be added.
|
|
9050
|
+
* @param offset The offset within the array of the fist byte to be added.
|
|
9051
|
+
* @param length The number of bytes to be added from the given array.
|
|
9052
|
+
* @returns {Number} Number of bytes that weren't added due to buffer not having enough space.
|
|
8969
9053
|
*/
|
|
8970
9054
|
|
|
8971
9055
|
|
|
@@ -8994,11 +9078,11 @@ var BlockDecoder = function () {
|
|
|
8994
9078
|
return numOfLeftoverBytes;
|
|
8995
9079
|
};
|
|
8996
9080
|
|
|
8997
|
-
/**
|
|
8998
|
-
* Incrementally decodes the data in the internal buffer.
|
|
8999
|
-
* Successive calls to this method will return the next decoded message as long enough data is avail
|
|
9000
|
-
* If not enough data is available null will be returned until more data is added.
|
|
9001
|
-
* @returns {*} The next decoded message or null if not enough data is available.
|
|
9081
|
+
/**
|
|
9082
|
+
* Incrementally decodes the data in the internal buffer.
|
|
9083
|
+
* Successive calls to this method will return the next decoded message as long enough data is avail
|
|
9084
|
+
* If not enough data is available null will be returned until more data is added.
|
|
9085
|
+
* @returns {*} The next decoded message or null if not enough data is available.
|
|
9002
9086
|
*/
|
|
9003
9087
|
|
|
9004
9088
|
|
|
@@ -9341,8 +9425,8 @@ function _inherits(subClass, superClass) { if (typeof superClass !== "function"
|
|
|
9341
9425
|
|
|
9342
9426
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
9343
9427
|
|
|
9344
|
-
/*
|
|
9345
|
-
Note: QITCH is currently in a Beta phase and can potentially cause performance degradation
|
|
9428
|
+
/*
|
|
9429
|
+
Note: QITCH is currently in a Beta phase and can potentially cause performance degradation
|
|
9346
9430
|
*/
|
|
9347
9431
|
var QitchDecoder = function () {
|
|
9348
9432
|
function QitchDecoder(bufferSize) {
|
|
@@ -10847,8 +10931,8 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "d
|
|
|
10847
10931
|
|
|
10848
10932
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
10849
10933
|
|
|
10850
|
-
/*
|
|
10851
|
-
Note: QITCH is currently in a Beta phase and can potentially cause performance degradation
|
|
10934
|
+
/*
|
|
10935
|
+
Note: QITCH is currently in a Beta phase and can potentially cause performance degradation
|
|
10852
10936
|
*/
|
|
10853
10937
|
var QitchEncoder = function () {
|
|
10854
10938
|
function QitchEncoder() {
|
|
@@ -10857,12 +10941,12 @@ var QitchEncoder = function () {
|
|
|
10857
10941
|
this.encoder = new MessageEncoder();
|
|
10858
10942
|
}
|
|
10859
10943
|
|
|
10860
|
-
/**
|
|
10861
|
-
* Encodes a message into its binary representation.
|
|
10862
|
-
* @param msg Msg {SMessage} the message to encode
|
|
10863
|
-
* @param offset The offset used to write message into a buffer
|
|
10864
|
-
* @returns {ArrayBuffer} the encoded bytes
|
|
10865
|
-
* @throws Throws an error if message cannot be encoded
|
|
10944
|
+
/**
|
|
10945
|
+
* Encodes a message into its binary representation.
|
|
10946
|
+
* @param msg Msg {SMessage} the message to encode
|
|
10947
|
+
* @param offset The offset used to write message into a buffer
|
|
10948
|
+
* @returns {ArrayBuffer} the encoded bytes
|
|
10949
|
+
* @throws Throws an error if message cannot be encoded
|
|
10866
10950
|
*/
|
|
10867
10951
|
|
|
10868
10952
|
|
|
@@ -11967,11 +12051,11 @@ exports["default"] = new function () {
|
|
|
11967
12051
|
|
|
11968
12052
|
// Generated by CoffeeScript 1.7.1
|
|
11969
12053
|
|
|
11970
|
-
/*
|
|
11971
|
-
Stomp Over WebSocket http://www.jmesnil.net/stomp-websocket/doc/ | Apache License V2.0
|
|
11972
|
-
|
|
11973
|
-
Copyright (C) 2010-2013 [Jeff Mesnil](http://jmesnil.net/)
|
|
11974
|
-
Copyright (C) 2012 [FuseSource, Inc.](http://fusesource.com)
|
|
12054
|
+
/*
|
|
12055
|
+
Stomp Over WebSocket http://www.jmesnil.net/stomp-websocket/doc/ | Apache License V2.0
|
|
12056
|
+
|
|
12057
|
+
Copyright (C) 2010-2013 [Jeff Mesnil](http://jmesnil.net/)
|
|
12058
|
+
Copyright (C) 2012 [FuseSource, Inc.](http://fusesource.com)
|
|
11975
12059
|
*/
|
|
11976
12060
|
|
|
11977
12061
|
(function () {
|
|
@@ -12470,6 +12554,10 @@ var _streamerEvents = require("../streamer-events.js");
|
|
|
12470
12554
|
|
|
12471
12555
|
var events = _interopRequireWildcard(_streamerEvents);
|
|
12472
12556
|
|
|
12557
|
+
var _http = require("../http.js");
|
|
12558
|
+
|
|
12559
|
+
var _http2 = _interopRequireDefault(_http);
|
|
12560
|
+
|
|
12473
12561
|
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj["default"] = obj; return newObj; } }
|
|
12474
12562
|
|
|
12475
12563
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
@@ -12478,12 +12566,23 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
|
|
|
12478
12566
|
|
|
12479
12567
|
var StompConnection = function () {
|
|
12480
12568
|
function StompConnection(createTransmitter, openSocket, log) {
|
|
12569
|
+
var maxReconnectAttempts = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 3;
|
|
12570
|
+
var pingUrl = arguments[4];
|
|
12571
|
+
|
|
12481
12572
|
_classCallCheck(this, StompConnection);
|
|
12482
12573
|
|
|
12483
12574
|
this.openSocket = openSocket;
|
|
12484
12575
|
this.createTransmitter = createTransmitter;
|
|
12485
12576
|
this.log = (0, _logging.asLogger)(log);
|
|
12486
12577
|
this.events = new _EventSupport2["default"](this);
|
|
12578
|
+
this.currentConn = '';
|
|
12579
|
+
//Max number of times that the client will try to reopen per loop
|
|
12580
|
+
this.maxReconnectAttempts = maxReconnectAttempts;
|
|
12581
|
+
//Max number of times client will be able to try to reopen in total. Once this is reached, client will close and no reconnect will be attempted.
|
|
12582
|
+
//probably means that an unhandled loop was reached
|
|
12583
|
+
this.maxReconnectsTotal = 3;
|
|
12584
|
+
this.isFirstConnection = true;
|
|
12585
|
+
this.pingUrl = pingUrl;
|
|
12487
12586
|
}
|
|
12488
12587
|
|
|
12489
12588
|
StompConnection.prototype.open = function open() {
|
|
@@ -12495,21 +12594,70 @@ var StompConnection = function () {
|
|
|
12495
12594
|
}
|
|
12496
12595
|
};
|
|
12497
12596
|
|
|
12498
|
-
|
|
12597
|
+
//Check to avoid creating unnecessary events and objects
|
|
12598
|
+
if (this.isFirstConnection) {
|
|
12599
|
+
this.on("reopen", function (e) {
|
|
12600
|
+
var prevConn = _this.currentConn;
|
|
12601
|
+
_this.currentConn = e.connectionId;
|
|
12602
|
+
_this.events.fire("reconnect", events.event("Reconnection success", {
|
|
12603
|
+
previousConnectionId: prevConn,
|
|
12604
|
+
currentConnectionId: _this.currentConn
|
|
12605
|
+
}));
|
|
12606
|
+
});
|
|
12499
12607
|
|
|
12500
|
-
|
|
12501
|
-
|
|
12502
|
-
|
|
12608
|
+
this.transmitter = this.createTransmitter(socketProxy);
|
|
12609
|
+
this.transmitter.on("message", function (message) {
|
|
12610
|
+
_this.events.fire("message", message);
|
|
12611
|
+
});
|
|
12612
|
+
}
|
|
12503
12613
|
|
|
12504
12614
|
this.socket = this.openSocket(function (request) {
|
|
12505
12615
|
_this.request = request;
|
|
12616
|
+
_this.reconnect = false;
|
|
12506
12617
|
return {
|
|
12618
|
+
onOpen: function onOpen(response) {
|
|
12619
|
+
if (response.command === "CONNECTED") {
|
|
12620
|
+
_this.isConnectionUp = true;
|
|
12621
|
+
var e = events.event("open", {
|
|
12622
|
+
connectionId: response.headers['user-name']
|
|
12623
|
+
});
|
|
12624
|
+
_this.log.info(e);
|
|
12625
|
+
_this.events.fire("open", e);
|
|
12626
|
+
if (!_this.isFirstConnection) {
|
|
12627
|
+
_this.maxReconnectsTotal--;
|
|
12628
|
+
_this.events.fire("reopen", e);
|
|
12629
|
+
}
|
|
12630
|
+
_this.currentConn = response.headers['user-name'];
|
|
12631
|
+
}
|
|
12632
|
+
},
|
|
12633
|
+
onError: function onError(response) {
|
|
12634
|
+
_this.isConnectionUp = false;
|
|
12635
|
+
_this.isServerUp(function (err, result) {
|
|
12636
|
+
if (err !== null) {
|
|
12637
|
+
_this.reconnect = false;
|
|
12638
|
+
_this.log.warn("Connection lost, Streamer Server isn't Up");
|
|
12639
|
+
} else {
|
|
12640
|
+
_this.reconnect = true;
|
|
12641
|
+
_this.log.warn('Connection lost, Streamer Server is Up');
|
|
12642
|
+
}
|
|
12643
|
+
});
|
|
12644
|
+
},
|
|
12645
|
+
onClose: function onClose() {
|
|
12646
|
+
_this.isConnectionUp = false;
|
|
12647
|
+
},
|
|
12507
12648
|
onMessage: function onMessage(response) {
|
|
12649
|
+
var responseBody = JSON.parse(response.body);
|
|
12650
|
+
if (responseBody.code !== undefined) {
|
|
12651
|
+
if (responseBody.code == 401 || responseBody.code == 403) {
|
|
12652
|
+
_this.log.info("Unable to reconnect with code: " + responseBody.code + ", reason: " + responseBody.reason);
|
|
12653
|
+
_this.reconnect = false;
|
|
12654
|
+
_this.isConnectionUp = false;
|
|
12655
|
+
}
|
|
12656
|
+
}
|
|
12508
12657
|
_this.transmitter.onMessage(response.body);
|
|
12509
12658
|
}
|
|
12510
|
-
|
|
12511
12659
|
};
|
|
12512
|
-
});
|
|
12660
|
+
}, this.currentConn);
|
|
12513
12661
|
};
|
|
12514
12662
|
|
|
12515
12663
|
StompConnection.prototype.close = function close() {
|
|
@@ -12517,6 +12665,9 @@ var StompConnection = function () {
|
|
|
12517
12665
|
try {
|
|
12518
12666
|
this.socket.close();
|
|
12519
12667
|
this.socket = null;
|
|
12668
|
+
if (this.reconnect) {
|
|
12669
|
+
this.tryReopen();
|
|
12670
|
+
}
|
|
12520
12671
|
} catch (err) {
|
|
12521
12672
|
this.events.fire("error", events.error("Error closing", {
|
|
12522
12673
|
reason: err.message,
|
|
@@ -12527,6 +12678,44 @@ var StompConnection = function () {
|
|
|
12527
12678
|
}
|
|
12528
12679
|
};
|
|
12529
12680
|
|
|
12681
|
+
StompConnection.prototype.tryReopen = function tryReopen() {
|
|
12682
|
+
var _this2 = this;
|
|
12683
|
+
|
|
12684
|
+
if (this.isConnectionUp || this.maxReconnectsTotal <= 0) {
|
|
12685
|
+
this.log.error("Connection is already open or max reconnects was reached, won't try to reconnect");
|
|
12686
|
+
return;
|
|
12687
|
+
}
|
|
12688
|
+
this.isFirstConnection = false;
|
|
12689
|
+
var currentAttempts = this.maxReconnectAttempts;
|
|
12690
|
+
var reconnect = function reconnect() {
|
|
12691
|
+
if (currentAttempts <= 0) {
|
|
12692
|
+
_this2.reconnect = false;
|
|
12693
|
+
_this2.log.error("Error while reconnecting. No attempts left.");
|
|
12694
|
+
//if maxattempts was reached and no connection was open, exit.
|
|
12695
|
+
_this2.maxReconnectAttempts = 0;
|
|
12696
|
+
return;
|
|
12697
|
+
}
|
|
12698
|
+
if (_this2.isConnectionUp || !_this2.reconnect) {
|
|
12699
|
+
return;
|
|
12700
|
+
}
|
|
12701
|
+
_this2.log.info("Attempting reconnect. Attempts left: " + currentAttempts);
|
|
12702
|
+
_this2.reopen(currentAttempts);
|
|
12703
|
+
currentAttempts--;
|
|
12704
|
+
|
|
12705
|
+
setTimeout(reconnect, 500);
|
|
12706
|
+
};
|
|
12707
|
+
setTimeout(reconnect, 500);
|
|
12708
|
+
};
|
|
12709
|
+
|
|
12710
|
+
StompConnection.prototype.reopen = function reopen(attempt) {
|
|
12711
|
+
try {
|
|
12712
|
+
this.open();
|
|
12713
|
+
} catch (exception) {
|
|
12714
|
+
this.log.warn("There was an error while reopening attempt #" + attempt);
|
|
12715
|
+
this.events.fire("error", exception);
|
|
12716
|
+
}
|
|
12717
|
+
};
|
|
12718
|
+
|
|
12530
12719
|
StompConnection.prototype.send = function send(message) {
|
|
12531
12720
|
try {
|
|
12532
12721
|
this.transmitter.send(message);
|
|
@@ -12539,6 +12728,14 @@ var StompConnection = function () {
|
|
|
12539
12728
|
}
|
|
12540
12729
|
};
|
|
12541
12730
|
|
|
12731
|
+
StompConnection.prototype.isReconnect = function isReconnect() {
|
|
12732
|
+
return this.request['x-Stream-isReconnect'];
|
|
12733
|
+
};
|
|
12734
|
+
|
|
12735
|
+
StompConnection.prototype.setReconnect = function setReconnect(doReconnect) {
|
|
12736
|
+
this.reconnect = doReconnect;
|
|
12737
|
+
};
|
|
12738
|
+
|
|
12542
12739
|
StompConnection.prototype.setServer = function setServer(server) {
|
|
12543
12740
|
this.request['X-Stream-Instance'] = server;
|
|
12544
12741
|
};
|
|
@@ -12547,6 +12744,21 @@ var StompConnection = function () {
|
|
|
12547
12744
|
return this.socket == null;
|
|
12548
12745
|
};
|
|
12549
12746
|
|
|
12747
|
+
StompConnection.prototype.isServerUp = function isServerUp(callback) {
|
|
12748
|
+
(0, _http2["default"])({
|
|
12749
|
+
url: this.pingUrl,
|
|
12750
|
+
success: function success(result) {
|
|
12751
|
+
return callback(null, result);
|
|
12752
|
+
},
|
|
12753
|
+
type: "GET",
|
|
12754
|
+
failure: callback
|
|
12755
|
+
});
|
|
12756
|
+
};
|
|
12757
|
+
|
|
12758
|
+
StompConnection.prototype.setConnectionUp = function setConnectionUp(isConnectionUp) {
|
|
12759
|
+
this.isConnectionUp = isConnectionUp;
|
|
12760
|
+
};
|
|
12761
|
+
|
|
12550
12762
|
StompConnection.prototype.on = function on(event, callback) {
|
|
12551
12763
|
return this.events.on(event, callback);
|
|
12552
12764
|
};
|
|
@@ -12556,7 +12768,7 @@ var StompConnection = function () {
|
|
|
12556
12768
|
|
|
12557
12769
|
exports["default"] = StompConnection;
|
|
12558
12770
|
}).call(this,require('_process'),typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {},require("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],require("timers").setImmediate,require("timers").clearImmediate,"/lib/stomp/StompConnection.js","/lib/stomp")
|
|
12559
|
-
},{"../EventSupport.js":2,"../logging.js":16,"../streamer-events.js":97,"_process":119,"buffer":109,"timers":140}],94:[function(require,module,exports){
|
|
12771
|
+
},{"../EventSupport.js":2,"../http.js":14,"../logging.js":16,"../streamer-events.js":97,"_process":119,"buffer":109,"timers":140}],94:[function(require,module,exports){
|
|
12560
12772
|
(function (process,global,Buffer,__argument0,__argument1,__argument2,__argument3,setImmediate,clearImmediate,__filename,__dirname){
|
|
12561
12773
|
"use strict";
|
|
12562
12774
|
|
|
@@ -12617,6 +12829,8 @@ var StompStream = function () {
|
|
|
12617
12829
|
_this.pendingConnection(err);
|
|
12618
12830
|
}
|
|
12619
12831
|
_this.events.fire("error", err);
|
|
12832
|
+
}).on("reconnect", function (msg) {
|
|
12833
|
+
_this.reconnectSuccess(msg);
|
|
12620
12834
|
});
|
|
12621
12835
|
|
|
12622
12836
|
this.requestid = new _UShortId2["default"]();
|
|
@@ -12647,6 +12861,11 @@ var StompStream = function () {
|
|
|
12647
12861
|
}
|
|
12648
12862
|
};
|
|
12649
12863
|
|
|
12864
|
+
StompStream.prototype.reconnectSuccess = function reconnectSuccess(msg) {
|
|
12865
|
+
this.events.fire("reconnectSuccess", msg);
|
|
12866
|
+
this.log.info("Successfull reconnection. Previous Id: " + msg.previousConnectionId + " Current Id = " + msg.currentConnectionId);
|
|
12867
|
+
};
|
|
12868
|
+
|
|
12650
12869
|
StompStream.prototype.on = function on(event, listener) {
|
|
12651
12870
|
return this.events.on(event, listener);
|
|
12652
12871
|
};
|
|
@@ -13260,6 +13479,12 @@ var StompStream = function () {
|
|
|
13260
13479
|
case _streamerApi.messages.MessageTypeNames.ctrl.OPEN_FLOW:
|
|
13261
13480
|
this.onOpenFlow(msg);
|
|
13262
13481
|
break;
|
|
13482
|
+
case _streamerApi.messages.MessageTypeNames.ctrl.RECONNECT_RESPONSE:
|
|
13483
|
+
this.onReconnectMessage(msg);
|
|
13484
|
+
break;
|
|
13485
|
+
case _streamerApi.messages.MessageTypeNames.ctrl.MISSED_DATA_SENT:
|
|
13486
|
+
this.onMissedDataSent(msg);
|
|
13487
|
+
break;
|
|
13263
13488
|
}
|
|
13264
13489
|
};
|
|
13265
13490
|
|
|
@@ -13719,8 +13944,18 @@ var StompStream = function () {
|
|
|
13719
13944
|
}
|
|
13720
13945
|
};
|
|
13721
13946
|
|
|
13947
|
+
StompStream.prototype.onReconnectMessage = function onReconnectMessage(msg) {
|
|
13948
|
+
if (msg.code === 450) {
|
|
13949
|
+
this.events.fire("slow", "Reconnection recieved a slow code: " + msg.code);
|
|
13950
|
+
this._isSlowConnection = true;
|
|
13951
|
+
this.conn.setReconnect = false;
|
|
13952
|
+
}
|
|
13953
|
+
this.events.fire("reconnectMessage", msg);
|
|
13954
|
+
console.log(msg);
|
|
13955
|
+
};
|
|
13956
|
+
|
|
13722
13957
|
StompStream.prototype.onConnectResponse = function onConnectResponse(msg) {
|
|
13723
|
-
if (msg.code
|
|
13958
|
+
if (msg.code !== 200) {
|
|
13724
13959
|
var event = events.error("Connection failed", {
|
|
13725
13960
|
code: msg.code,
|
|
13726
13961
|
reason: msg.reason
|
|
@@ -13787,6 +14022,11 @@ var StompStream = function () {
|
|
|
13787
14022
|
this.events.fire("resubscribeMessage", msg);
|
|
13788
14023
|
};
|
|
13789
14024
|
|
|
14025
|
+
StompStream.prototype.onMissedDataSent = function onMissedDataSent(msg) {
|
|
14026
|
+
this.log.debug(_formatting.msgfmt.fmt(msg));
|
|
14027
|
+
this.events.fire("missedDataSent", msg);
|
|
14028
|
+
};
|
|
14029
|
+
|
|
13790
14030
|
StompStream.prototype.onOpenFlow = function onOpenFlow(msg) {
|
|
13791
14031
|
this.conn.send(msg);
|
|
13792
14032
|
};
|
|
@@ -13805,8 +14045,29 @@ var StompStream = function () {
|
|
|
13805
14045
|
if (!this.isClosed()) {
|
|
13806
14046
|
var conn = this.conn;
|
|
13807
14047
|
this.conn = null;
|
|
13808
|
-
this.events.fire("close", msg);
|
|
13809
14048
|
conn.close();
|
|
14049
|
+
this.events.fire("close", msg);
|
|
14050
|
+
if (conn.isReconnect()) {
|
|
14051
|
+
//Will need to reset the events since they duplicate each time it reconnects.
|
|
14052
|
+
this.events = new _EventSupport2["default"]();
|
|
14053
|
+
this.conn = conn;
|
|
14054
|
+
}
|
|
14055
|
+
}
|
|
14056
|
+
};
|
|
14057
|
+
|
|
14058
|
+
StompStream.prototype.performReconnect = function performReconnect(callback) {
|
|
14059
|
+
if (this.conn != null && this.conn.isReconnect()) {
|
|
14060
|
+
if (this.conn.isConnectionUp) {
|
|
14061
|
+
this.log.warn("Connection is not closed and won't try reconnect.");
|
|
14062
|
+
return;
|
|
14063
|
+
}
|
|
14064
|
+
this.conn.setReconnect(true);
|
|
14065
|
+
this.conn.tryReopen();
|
|
14066
|
+
if (callback) {
|
|
14067
|
+
callback();
|
|
14068
|
+
}
|
|
14069
|
+
} else {
|
|
14070
|
+
this.log.warn("Reconnect flag is set to false");
|
|
13810
14071
|
}
|
|
13811
14072
|
};
|
|
13812
14073
|
|
|
@@ -13865,6 +14126,8 @@ var STREAMURLS = {
|
|
|
13865
14126
|
"streamStomp": "/stream/connect"
|
|
13866
14127
|
};
|
|
13867
14128
|
|
|
14129
|
+
var HEADERPARAMS = '';
|
|
14130
|
+
|
|
13868
14131
|
var StompStreamingService = function () {
|
|
13869
14132
|
function StompStreamingService(http, stompJs, log, config) {
|
|
13870
14133
|
var _this = this;
|
|
@@ -13875,6 +14138,7 @@ var StompStreamingService = function () {
|
|
|
13875
14138
|
this.stompJs = stompJs;
|
|
13876
14139
|
this.log = (0, _logging.asLogger)(log);
|
|
13877
14140
|
this.config = config || {};
|
|
14141
|
+
this.maxReconnectAttempts = this.config.maxReconnectAttempts;
|
|
13878
14142
|
|
|
13879
14143
|
this.format = this.config.format;
|
|
13880
14144
|
if (this.config.format === 'application/json') {
|
|
@@ -13884,33 +14148,71 @@ var StompStreamingService = function () {
|
|
|
13884
14148
|
}
|
|
13885
14149
|
}
|
|
13886
14150
|
|
|
13887
|
-
StompStreamingService.prototype.openStompSocket = function openStompSocket(handlers) {
|
|
14151
|
+
StompStreamingService.prototype.openStompSocket = function openStompSocket(handlers, connectionId) {
|
|
14152
|
+
HEADERPARAMS = '';
|
|
13888
14153
|
var headers = {
|
|
13889
14154
|
'X-Stream-Version': _streamerApi.VERSION,
|
|
13890
14155
|
'X-Stream-Lib': _streamerApi.LIBRARY_NAME
|
|
13891
14156
|
};
|
|
14157
|
+
this.addToHeaderParams('X-Stream-Version', _streamerApi.VERSION);
|
|
14158
|
+
this.addToHeaderParams('X-Stream-Lib', _streamerApi.LIBRARY_NAME);
|
|
13892
14159
|
|
|
13893
14160
|
var _conflation = this.config.conflation;
|
|
13894
14161
|
if (_conflation != null && _conflation !== '') {
|
|
13895
14162
|
headers['X-Stream-Conflation'] = _conflation;
|
|
14163
|
+
this.addToHeaderParams('X-Stream-Conflation', _conflation);
|
|
14164
|
+
}
|
|
14165
|
+
|
|
14166
|
+
if (connectionId != null && connectionId !== '') {
|
|
14167
|
+
headers['X-Stream-Previous-Connection-Id'] = connectionId;
|
|
14168
|
+
this.addToHeaderParams('X-Stream-Previous-Connection-Id', connectionId);
|
|
13896
14169
|
}
|
|
13897
14170
|
|
|
13898
14171
|
var _rejectExcessiveConnection = this.config.rejectExcessiveConnection;
|
|
13899
14172
|
if (_rejectExcessiveConnection != null && _rejectExcessiveConnection !== '') {
|
|
13900
14173
|
headers['X-Stream-Reject'] = _rejectExcessiveConnection;
|
|
14174
|
+
this.addToHeaderParams('X-Stream-Reject', _rejectExcessiveConnection);
|
|
13901
14175
|
}
|
|
13902
14176
|
|
|
13903
14177
|
if (this.config.format === 'application/json' || this.config.format === _message.MimeTypes.QITCH) {
|
|
13904
14178
|
headers['X-Stream-Format'] = this.format;
|
|
14179
|
+
this.addToHeaderParams('X-Stream-Format', this.format);
|
|
13905
14180
|
}
|
|
13906
14181
|
|
|
13907
14182
|
if (this.config.updatesOnly === 'true') {
|
|
13908
14183
|
headers['X-Stream-UpdatesOnly'] = true;
|
|
14184
|
+
this.addToHeaderParams('X-Stream-UpdatesOnly', true);
|
|
14185
|
+
}
|
|
14186
|
+
|
|
14187
|
+
var _isReconnect = this.config.isReconnect;
|
|
14188
|
+
if (_isReconnect != null && _isReconnect !== '') {
|
|
14189
|
+
headers['x-Stream-isReconnect'] = _isReconnect;
|
|
14190
|
+
this.addToHeaderParams('x-Stream-isReconnect', _isReconnect);
|
|
14191
|
+
}
|
|
14192
|
+
|
|
14193
|
+
var _alwaysReconnect = this.config.alwaysReconnect;
|
|
14194
|
+
if (_alwaysReconnect != null && _alwaysReconnect !== '') {
|
|
14195
|
+
headers['x-Stream-isAlwaysReopen'] = _alwaysReconnect;
|
|
14196
|
+
this.addToHeaderParams('x-Stream-isAlwaysReopen', _alwaysReconnect);
|
|
14197
|
+
}
|
|
14198
|
+
|
|
14199
|
+
if (this.config.isMissedData === 'ALL') {
|
|
14200
|
+
headers['X-Stream-isReceiveAllMissedData'] = true;
|
|
14201
|
+
this.addToHeaderParams('X-Stream-isReceiveAllMissedData', true);
|
|
14202
|
+
} else if (this.config.isMissedData === 'LATEST') {
|
|
14203
|
+
headers['X-Stream-isReceiveLatestMissedData'] = true;
|
|
14204
|
+
this.addToHeaderParams('X-Stream-isReceiveLatestMissedData', true);
|
|
14205
|
+
}
|
|
14206
|
+
|
|
14207
|
+
var _stompWmid = this.config.stompWmid;
|
|
14208
|
+
if (_stompWmid != null) {
|
|
14209
|
+
headers['wmid'] = _stompWmid;
|
|
14210
|
+
this.addToHeaderParams('wmid', _stompWmid);
|
|
13909
14211
|
}
|
|
13910
14212
|
|
|
13911
14213
|
Object.assign(headers, this.config.credentials.getHeaders());
|
|
13912
14214
|
|
|
13913
|
-
var url = this.config.url + STREAMURLS.streamStomp;
|
|
14215
|
+
var url = this.config.url + STREAMURLS.streamStomp + HEADERPARAMS;
|
|
13914
14216
|
var stompClient = this.stompJs.Stomp.client(url);
|
|
13915
14217
|
|
|
13916
14218
|
var authMessage = new _streamerApi.messages.control.AuthenticationMessage();
|
|
@@ -13919,6 +14221,7 @@ var StompStreamingService = function () {
|
|
|
13919
14221
|
authMessage.authorization = this.config.credentials.sid;
|
|
13920
14222
|
} else if (this.config.credentials.wmid !== undefined && this.config.credentials.token !== undefined) {
|
|
13921
14223
|
authMessage.authenticationMethod = "enterprise";
|
|
14224
|
+
authMessage.wmid = this.config.credentials.wmid;
|
|
13922
14225
|
authMessage.authorization = this.config.credentials.token;
|
|
13923
14226
|
} else if (this.config.credentials.wmid !== undefined) {
|
|
13924
14227
|
authMessage.authenticationMethod = "wmid";
|
|
@@ -13936,12 +14239,15 @@ var StompStreamingService = function () {
|
|
|
13936
14239
|
authMessage.rejectExcessiveConnection = this.config.rejectExcessiveConnection;
|
|
13937
14240
|
}
|
|
13938
14241
|
|
|
13939
|
-
stompClient.connect(
|
|
14242
|
+
stompClient.connect(headers, function (frame) {
|
|
13940
14243
|
stompClient.subscribe('/user/queue/messages', function (responseMessage) {
|
|
13941
14244
|
handlers(headers).onMessage(responseMessage);
|
|
13942
14245
|
});
|
|
13943
14246
|
|
|
14247
|
+
handlers(headers).onOpen(frame);
|
|
13944
14248
|
stompClient.send("/stream/message", headers, JSON.stringify(authMessage));
|
|
14249
|
+
}, function (frame) {
|
|
14250
|
+
handlers(headers).onError(frame);
|
|
13945
14251
|
});
|
|
13946
14252
|
|
|
13947
14253
|
return {
|
|
@@ -13949,7 +14255,9 @@ var StompStreamingService = function () {
|
|
|
13949
14255
|
stompClient.send("/stream/message", headers, msg);
|
|
13950
14256
|
},
|
|
13951
14257
|
close: function close() {
|
|
13952
|
-
stompClient.disconnect()
|
|
14258
|
+
stompClient.disconnect(function () {
|
|
14259
|
+
handlers(headers).onClose();
|
|
14260
|
+
});
|
|
13953
14261
|
}
|
|
13954
14262
|
};
|
|
13955
14263
|
};
|
|
@@ -13959,9 +14267,9 @@ var StompStreamingService = function () {
|
|
|
13959
14267
|
|
|
13960
14268
|
return new _StompConnection2["default"](function (socket) {
|
|
13961
14269
|
return _this2.createTransmitter(socket);
|
|
13962
|
-
}, function (handlers) {
|
|
13963
|
-
return _this2.openStompSocket(handlers);
|
|
13964
|
-
}, this.
|
|
14270
|
+
}, function (handlers, connectionId) {
|
|
14271
|
+
return _this2.openStompSocket(handlers, connectionId);
|
|
14272
|
+
}, this.log, this.maxReconnectAttempts, this.config.host + STREAMURLS.ping);
|
|
13965
14273
|
};
|
|
13966
14274
|
|
|
13967
14275
|
StompStreamingService.prototype.openStompStream = function openStompStream(callback) {
|
|
@@ -13991,6 +14299,14 @@ var StompStreamingService = function () {
|
|
|
13991
14299
|
});
|
|
13992
14300
|
};
|
|
13993
14301
|
|
|
14302
|
+
StompStreamingService.prototype.addToHeaderParams = function addToHeaderParams(header, val) {
|
|
14303
|
+
if (HEADERPARAMS === '') {
|
|
14304
|
+
HEADERPARAMS = HEADERPARAMS + '?' + header + '=' + val;
|
|
14305
|
+
} else {
|
|
14306
|
+
HEADERPARAMS = HEADERPARAMS + '&' + header + '=' + val;
|
|
14307
|
+
}
|
|
14308
|
+
};
|
|
14309
|
+
|
|
13994
14310
|
return StompStreamingService;
|
|
13995
14311
|
}();
|
|
13996
14312
|
|
|
@@ -14003,1094 +14319,1149 @@ exports["default"] = StompStreamingService;
|
|
|
14003
14319
|
exports.__esModule = true;
|
|
14004
14320
|
/* @see http://usejsdoc.org */
|
|
14005
14321
|
|
|
14006
|
-
/**
|
|
14007
|
-
* Streamer api namespace.
|
|
14008
|
-
* @namespace
|
|
14322
|
+
/**
|
|
14323
|
+
* Streamer api namespace.
|
|
14324
|
+
* @namespace
|
|
14009
14325
|
*/
|
|
14010
14326
|
|
|
14011
14327
|
var LIBRARY_NAME = exports.LIBRARY_NAME = "JavaScript";
|
|
14012
|
-
var VERSION = exports.VERSION = "2.
|
|
14328
|
+
var VERSION = exports.VERSION = "2.36.0";
|
|
14013
14329
|
|
|
14014
|
-
/**
|
|
14015
|
-
* Streamer message api namespace.
|
|
14016
|
-
* @namespace
|
|
14330
|
+
/**
|
|
14331
|
+
* Streamer message api namespace.
|
|
14332
|
+
* @namespace
|
|
14017
14333
|
*/
|
|
14018
14334
|
var messages = exports.messages = {};
|
|
14019
14335
|
|
|
14020
|
-
/**
|
|
14021
|
-
* Streamer control message namespace. * @namespace
|
|
14336
|
+
/**
|
|
14337
|
+
* Streamer control message namespace. * @namespace
|
|
14022
14338
|
*/
|
|
14023
14339
|
messages.control = {};
|
|
14024
14340
|
|
|
14025
|
-
/**
|
|
14026
|
-
* Streamer market data message namespace.
|
|
14027
|
-
* @namespace
|
|
14341
|
+
/**
|
|
14342
|
+
* Streamer market data message namespace.
|
|
14343
|
+
* @namespace
|
|
14028
14344
|
*/
|
|
14029
14345
|
messages.market = {};
|
|
14030
14346
|
|
|
14031
14347
|
/* ****************************************************************************************************************** */
|
|
14032
14348
|
|
|
14033
|
-
/**
|
|
14034
|
-
*
|
|
14035
|
-
* @type {string}
|
|
14349
|
+
/**
|
|
14350
|
+
*
|
|
14351
|
+
* @type {string}
|
|
14036
14352
|
*/
|
|
14037
14353
|
messages.JSON_TYPE_PROPERTY = '@T';
|
|
14038
14354
|
|
|
14039
|
-
/**
|
|
14040
|
-
* Message type identifiers.<br>
|
|
14041
|
-
* Ensure identifiers are unique within this name space.
|
|
14042
|
-
* @namespace
|
|
14355
|
+
/**
|
|
14356
|
+
* Message type identifiers.<br>
|
|
14357
|
+
* Ensure identifiers are unique within this name space.
|
|
14358
|
+
* @namespace
|
|
14043
14359
|
*/
|
|
14044
14360
|
messages.MessageTypeNames = {
|
|
14045
|
-
|
|
14046
|
-
|
|
14047
|
-
|
|
14048
|
-
|
|
14049
|
-
|
|
14050
|
-
|
|
14051
|
-
|
|
14052
|
-
|
|
14053
|
-
|
|
14054
|
-
|
|
14055
|
-
|
|
14056
|
-
|
|
14057
|
-
|
|
14058
|
-
|
|
14059
|
-
|
|
14060
|
-
|
|
14061
|
-
|
|
14062
|
-
|
|
14063
|
-
|
|
14064
|
-
|
|
14065
|
-
|
|
14066
|
-
|
|
14067
|
-
|
|
14068
|
-
|
|
14069
|
-
|
|
14070
|
-
|
|
14071
|
-
|
|
14072
|
-
|
|
14073
|
-
|
|
14074
|
-
|
|
14075
|
-
|
|
14076
|
-
|
|
14077
|
-
|
|
14078
|
-
|
|
14079
|
-
|
|
14080
|
-
|
|
14081
|
-
|
|
14082
|
-
|
|
14083
|
-
|
|
14084
|
-
|
|
14085
|
-
|
|
14086
|
-
|
|
14087
|
-
|
|
14088
|
-
|
|
14089
|
-
|
|
14090
|
-
|
|
14091
|
-
|
|
14092
|
-
|
|
14093
|
-
|
|
14094
|
-
|
|
14095
|
-
|
|
14096
|
-
|
|
14097
|
-
|
|
14098
|
-
|
|
14099
|
-
|
|
14100
|
-
|
|
14101
|
-
|
|
14102
|
-
|
|
14103
|
-
|
|
14104
|
-
|
|
14105
|
-
|
|
14106
|
-
|
|
14107
|
-
|
|
14108
|
-
|
|
14361
|
+
/**
|
|
14362
|
+
* Name space for control message type identifiers.
|
|
14363
|
+
* @namespace
|
|
14364
|
+
*/
|
|
14365
|
+
ctrl: {
|
|
14366
|
+
HEARTBEAT: 'C1',
|
|
14367
|
+
SUBSCRIBE: 'C2',
|
|
14368
|
+
SUBSCRIBE_RESPONSE: 'C3',
|
|
14369
|
+
UNSUBSCRIBE_RESPONSE: 'C4',
|
|
14370
|
+
CONNECT_RESPONSE: 'C5',
|
|
14371
|
+
CONNECTION_CLOSE: 'C6',
|
|
14372
|
+
FLOW: 'C7',
|
|
14373
|
+
SLOW_CONNECTION: 'C8',
|
|
14374
|
+
INITIAL_DATA_SENT: 'C9',
|
|
14375
|
+
RESUBSCRIBE_MESSAGE: 'C10',
|
|
14376
|
+
STATS: 'C12',
|
|
14377
|
+
STATS_RESPONSE: 'C13',
|
|
14378
|
+
EXCHANGE_SUBSCRIBE: 'C14',
|
|
14379
|
+
EXCHANGE_RESPONSE: 'C15',
|
|
14380
|
+
EXCHANGE_UNSUBSCRIBE_RESPONSE: 'C16',
|
|
14381
|
+
NEWS_SUBSCRIBE: 'C17',
|
|
14382
|
+
NEWS_SUBSCRIBE_RESPONSE: 'C18',
|
|
14383
|
+
ALERTS_SUBUNSUB: 'C19',
|
|
14384
|
+
ALERTS_SUBUNSUB_RESPONSE: 'C20',
|
|
14385
|
+
TRADE_SUBSCRIBE: 'C21',
|
|
14386
|
+
TRADE_SUBSCRIBE_RESPONSE: 'C22',
|
|
14387
|
+
NEWS_UNSUBSCRIBE_RESPONSE: 'C23',
|
|
14388
|
+
NEWS_COMMAND: 'C24',
|
|
14389
|
+
NEWS_CMD_FILTER_REFRESH_RESPONSE: 'C25',
|
|
14390
|
+
NEWS_CMD_FILTER_RESPONSE: 'C26',
|
|
14391
|
+
AUTHENTICATION: 'C27',
|
|
14392
|
+
OPEN_FLOW: 'C28',
|
|
14393
|
+
RECONNECT_RESPONSE: 'C29',
|
|
14394
|
+
TRADE_UNSUBSCRIBE_RESPONSE: 'C30',
|
|
14395
|
+
MISSED_DATA_SENT: 'C31'
|
|
14396
|
+
},
|
|
14397
|
+
/**
|
|
14398
|
+
* Name space for data message type identifiers.<br>
|
|
14399
|
+
* Prefix with 'D'.
|
|
14400
|
+
* @namespace
|
|
14401
|
+
*/
|
|
14402
|
+
data: {
|
|
14403
|
+
QUOTE: 'D1',
|
|
14404
|
+
PRICEDATA: 'D2',
|
|
14405
|
+
TRADE: 'D3',
|
|
14406
|
+
BOOKORDER: 'D4',
|
|
14407
|
+
BOOKDELETE: 'D5',
|
|
14408
|
+
PURGEBOOK: 'D6',
|
|
14409
|
+
MMQUOTE: 'D7',
|
|
14410
|
+
INTERVAL: 'D8',
|
|
14411
|
+
NETHOUSEPOSITION: 'D9',
|
|
14412
|
+
SYMBOLINFO: 'D10',
|
|
14413
|
+
SYMBOLSTATUS: 'D11',
|
|
14414
|
+
DERIVATIVEINFO: 'D12',
|
|
14415
|
+
LASTSALE: 'D13',
|
|
14416
|
+
LIMITUPLIMITDOWN: 'D14',
|
|
14417
|
+
IVGREEKS: 'D15',
|
|
14418
|
+
IMBALANCESTATUS: 'D16',
|
|
14419
|
+
ALERT: 'D17',
|
|
14420
|
+
NEWS: 'D18',
|
|
14421
|
+
TRADENOTIFICATION: 'D19',
|
|
14422
|
+
NEWSCMDFILTER: 'D20',
|
|
14423
|
+
NEWSERROR: 'D21',
|
|
14424
|
+
DIVIDEND: 'D22'
|
|
14425
|
+
}
|
|
14109
14426
|
};
|
|
14110
14427
|
|
|
14111
|
-
/**
|
|
14112
|
-
* Super type of all exports.
|
|
14113
|
-
* @abstract
|
|
14114
|
-
* @constructor
|
|
14428
|
+
/**
|
|
14429
|
+
* Super type of all exports.
|
|
14430
|
+
* @abstract
|
|
14431
|
+
* @constructor
|
|
14115
14432
|
*/
|
|
14116
14433
|
messages.Message = function () {};
|
|
14117
14434
|
|
|
14118
14435
|
messages.Message.prototype.init = function (typeid) {
|
|
14119
|
-
|
|
14436
|
+
this[messages.JSON_TYPE_PROPERTY] = typeid;
|
|
14120
14437
|
};
|
|
14121
14438
|
|
|
14122
14439
|
/* ****************************************************************************************************************** */
|
|
14123
14440
|
|
|
14124
|
-
/**
|
|
14125
|
-
* Creates a control message base object.
|
|
14126
|
-
* @abstract
|
|
14127
|
-
* @constructor
|
|
14441
|
+
/**
|
|
14442
|
+
* Creates a control message base object.
|
|
14443
|
+
* @abstract
|
|
14444
|
+
* @constructor
|
|
14128
14445
|
*/
|
|
14129
14446
|
messages.control.CtrlMessage = function () {};
|
|
14130
14447
|
messages.control.CtrlMessage.prototype = new messages.Message();
|
|
14131
14448
|
|
|
14132
|
-
/**
|
|
14133
|
-
* Creates a heartbeat message.
|
|
14134
|
-
* @constructor
|
|
14449
|
+
/**
|
|
14450
|
+
* Creates a heartbeat message.
|
|
14451
|
+
* @constructor
|
|
14135
14452
|
*/
|
|
14136
14453
|
messages.control.Heartbeat = function () {
|
|
14137
|
-
|
|
14454
|
+
this.init(messages.MessageTypeNames.ctrl.HEARTBEAT);
|
|
14138
14455
|
|
|
14139
|
-
|
|
14140
|
-
|
|
14141
|
-
|
|
14142
|
-
|
|
14143
|
-
|
|
14144
|
-
|
|
14456
|
+
/**
|
|
14457
|
+
* Timestamp when heartbeat was generated.
|
|
14458
|
+
* @type {number|JSBI} for connections with JSON format timestamp will be decoded as number,
|
|
14459
|
+
* for connections with QITCH format - {@link JSBI.BigInt}
|
|
14460
|
+
*/
|
|
14461
|
+
this.timestamp = null;
|
|
14145
14462
|
};
|
|
14146
14463
|
messages.control.Heartbeat.prototype = new messages.control.CtrlMessage();
|
|
14147
|
-
/**
|
|
14148
|
-
* Creates a stats message.
|
|
14149
|
-
* @constructor
|
|
14464
|
+
/**
|
|
14465
|
+
* Creates a stats message.
|
|
14466
|
+
* @constructor
|
|
14150
14467
|
*/
|
|
14151
14468
|
messages.control.StatsMessage = function () {
|
|
14152
|
-
|
|
14469
|
+
this.init(messages.MessageTypeNames.ctrl.STATS);
|
|
14153
14470
|
};
|
|
14154
14471
|
messages.control.StatsMessage.prototype = new messages.control.CtrlMessage();
|
|
14155
14472
|
|
|
14156
|
-
/**
|
|
14157
|
-
* Creates a subscribe message.
|
|
14158
|
-
* @constructor
|
|
14473
|
+
/**
|
|
14474
|
+
* Creates a subscribe message.
|
|
14475
|
+
* @constructor
|
|
14159
14476
|
*/
|
|
14160
14477
|
messages.control.SubscribeMessage = function () {
|
|
14161
|
-
|
|
14478
|
+
this.init(messages.MessageTypeNames.ctrl.SUBSCRIBE);
|
|
14162
14479
|
|
|
14163
|
-
|
|
14164
|
-
|
|
14165
|
-
|
|
14166
|
-
|
|
14167
|
-
|
|
14168
|
-
|
|
14480
|
+
/**
|
|
14481
|
+
* The action the server will taken when receiving this message.
|
|
14482
|
+
* @type {string}
|
|
14483
|
+
* @see exports.messages.control.Action
|
|
14484
|
+
*/
|
|
14485
|
+
this.action = null;
|
|
14169
14486
|
|
|
14170
|
-
|
|
14171
|
-
|
|
14172
|
-
|
|
14173
|
-
|
|
14174
|
-
|
|
14487
|
+
/**
|
|
14488
|
+
* List of ticker symbols to subscribe/un-subscribe for.
|
|
14489
|
+
* @type {Array.<string>}
|
|
14490
|
+
*/
|
|
14491
|
+
this.symbols = [];
|
|
14175
14492
|
|
|
14176
|
-
|
|
14177
|
-
|
|
14178
|
-
|
|
14179
|
-
|
|
14180
|
-
|
|
14181
|
-
|
|
14493
|
+
/**
|
|
14494
|
+
* List of streaming message types to subscribe each ticker symbol for.
|
|
14495
|
+
* @type {Array.<string>}
|
|
14496
|
+
* @see exports.messages.control.MarketdataType
|
|
14497
|
+
*/
|
|
14498
|
+
this.types = [];
|
|
14182
14499
|
|
|
14183
|
-
|
|
14184
|
-
|
|
14185
|
-
|
|
14186
|
-
|
|
14187
|
-
|
|
14188
|
-
|
|
14500
|
+
/**
|
|
14501
|
+
* Requested message mime-type format.
|
|
14502
|
+
* @type {string}
|
|
14503
|
+
* @see exports.messages.MimeTypes
|
|
14504
|
+
*/
|
|
14505
|
+
this.mimetype = null;
|
|
14189
14506
|
|
|
14190
|
-
|
|
14191
|
-
|
|
14192
|
-
|
|
14193
|
-
|
|
14194
|
-
|
|
14507
|
+
/**
|
|
14508
|
+
* Requested conflation. Null indicates using the default conflation.
|
|
14509
|
+
* @type {int}
|
|
14510
|
+
*/
|
|
14511
|
+
this.conflation = null;
|
|
14195
14512
|
};
|
|
14196
14513
|
messages.control.SubscribeMessage.prototype = new messages.control.CtrlMessage();
|
|
14197
14514
|
|
|
14198
|
-
/**
|
|
14199
|
-
* Creates an exchange subscribe message.
|
|
14200
|
-
* @constructor
|
|
14515
|
+
/**
|
|
14516
|
+
* Creates an exchange subscribe message.
|
|
14517
|
+
* @constructor
|
|
14201
14518
|
*/
|
|
14202
14519
|
messages.control.ExchangeSubscribeMessage = function () {
|
|
14203
|
-
|
|
14520
|
+
this.init(messages.MessageTypeNames.ctrl.EXCHANGE_SUBSCRIBE);
|
|
14204
14521
|
|
|
14205
|
-
|
|
14206
|
-
|
|
14207
|
-
|
|
14208
|
-
|
|
14209
|
-
|
|
14210
|
-
|
|
14522
|
+
/**
|
|
14523
|
+
* The action the server will taken when receiving this message.
|
|
14524
|
+
* @type {string}
|
|
14525
|
+
* @see exports.messages.control.Action
|
|
14526
|
+
*/
|
|
14527
|
+
this.action = null;
|
|
14211
14528
|
|
|
14212
|
-
|
|
14213
|
-
|
|
14214
|
-
|
|
14215
|
-
|
|
14216
|
-
|
|
14529
|
+
/**
|
|
14530
|
+
* The Exchange to subscribe/un-subscribe for.
|
|
14531
|
+
* @type {Array.<string>}
|
|
14532
|
+
*/
|
|
14533
|
+
this.exchange = null;
|
|
14217
14534
|
|
|
14218
|
-
|
|
14219
|
-
|
|
14220
|
-
|
|
14221
|
-
|
|
14222
|
-
|
|
14223
|
-
|
|
14535
|
+
/**
|
|
14536
|
+
* Requested message mime-type format.
|
|
14537
|
+
* @type {string}
|
|
14538
|
+
* @see exports.messages.MimeTypes
|
|
14539
|
+
*/
|
|
14540
|
+
this.mimetype = null;
|
|
14224
14541
|
|
|
14225
|
-
|
|
14226
|
-
|
|
14227
|
-
|
|
14228
|
-
|
|
14229
|
-
|
|
14542
|
+
/**
|
|
14543
|
+
* Requested conflation. Null indicates using the default conflation.
|
|
14544
|
+
* @type {int}
|
|
14545
|
+
*/
|
|
14546
|
+
this.conflation = null;
|
|
14230
14547
|
};
|
|
14231
14548
|
messages.control.ExchangeSubscribeMessage.prototype = new messages.control.CtrlMessage();
|
|
14232
14549
|
|
|
14233
|
-
/**
|
|
14234
|
-
* Creates an news subscribe message.
|
|
14235
|
-
* @constructor
|
|
14550
|
+
/**
|
|
14551
|
+
* Creates an news subscribe message.
|
|
14552
|
+
* @constructor
|
|
14236
14553
|
*/
|
|
14237
14554
|
messages.control.NewsSubscribeMessage = function () {
|
|
14238
|
-
|
|
14555
|
+
this.init(messages.MessageTypeNames.ctrl.NEWS_SUBSCRIBE);
|
|
14239
14556
|
|
|
14240
|
-
|
|
14241
|
-
|
|
14242
|
-
|
|
14243
|
-
|
|
14244
|
-
|
|
14245
|
-
|
|
14557
|
+
/**
|
|
14558
|
+
* The action the server will taken when receiving this message.
|
|
14559
|
+
* @type {string}
|
|
14560
|
+
* @see exports.messages.control.Action
|
|
14561
|
+
*/
|
|
14562
|
+
this.action = null;
|
|
14246
14563
|
|
|
14247
|
-
|
|
14248
|
-
|
|
14249
|
-
|
|
14250
|
-
|
|
14251
|
-
|
|
14564
|
+
/**
|
|
14565
|
+
* The news filters to subscribe for.
|
|
14566
|
+
* @type {Array.<string>}
|
|
14567
|
+
*/
|
|
14568
|
+
this.newsFilters = null;
|
|
14252
14569
|
|
|
14253
|
-
|
|
14254
|
-
|
|
14255
|
-
|
|
14256
|
-
|
|
14257
|
-
|
|
14258
|
-
|
|
14570
|
+
/**
|
|
14571
|
+
* Requested message mime-type format.
|
|
14572
|
+
* @type {string}
|
|
14573
|
+
* @see exports.messages.MimeTypes
|
|
14574
|
+
*/
|
|
14575
|
+
this.mimetype = null;
|
|
14259
14576
|
};
|
|
14260
14577
|
messages.control.NewsSubscribeMessage.prototype = new messages.control.CtrlMessage();
|
|
14261
14578
|
|
|
14262
|
-
/**
|
|
14263
|
-
* Creates an news reset message.
|
|
14264
|
-
* @constructor
|
|
14579
|
+
/**
|
|
14580
|
+
* Creates an news reset message.
|
|
14581
|
+
* @constructor
|
|
14265
14582
|
*/
|
|
14266
14583
|
messages.control.NewsCommandMessage = function () {
|
|
14267
|
-
|
|
14584
|
+
this.init(messages.MessageTypeNames.ctrl.NEWS_COMMAND);
|
|
14268
14585
|
|
|
14269
|
-
|
|
14270
|
-
|
|
14271
|
-
|
|
14272
|
-
|
|
14273
|
-
|
|
14274
|
-
|
|
14586
|
+
/**
|
|
14587
|
+
* The action the server will taken when receiving this message.
|
|
14588
|
+
* @type {string}
|
|
14589
|
+
* @see exports.messages.control.Action
|
|
14590
|
+
*/
|
|
14591
|
+
this.newsAction = null;
|
|
14275
14592
|
|
|
14276
|
-
|
|
14277
|
-
|
|
14278
|
-
|
|
14279
|
-
|
|
14280
|
-
|
|
14281
|
-
|
|
14593
|
+
/**
|
|
14594
|
+
* Requested message mime-type format.
|
|
14595
|
+
* @type {string}
|
|
14596
|
+
* @see exports.messages.MimeTypes
|
|
14597
|
+
*/
|
|
14598
|
+
this.mimetype = null;
|
|
14282
14599
|
};
|
|
14283
14600
|
messages.control.NewsCommandMessage.prototype = new messages.control.CtrlMessage();
|
|
14284
14601
|
|
|
14285
|
-
/**
|
|
14286
|
-
* Creates an news subscribe message.
|
|
14287
|
-
* @constructor
|
|
14602
|
+
/**
|
|
14603
|
+
* Creates an news subscribe message.
|
|
14604
|
+
* @constructor
|
|
14288
14605
|
*/
|
|
14289
14606
|
messages.control.AlertsSubUnsubMessage = function () {
|
|
14290
|
-
|
|
14607
|
+
this.init(messages.MessageTypeNames.ctrl.ALERTS_SUBUNSUB);
|
|
14291
14608
|
|
|
14292
|
-
|
|
14293
|
-
|
|
14294
|
-
|
|
14295
|
-
|
|
14296
|
-
|
|
14609
|
+
/**
|
|
14610
|
+
* sub/unsub for alerts.
|
|
14611
|
+
* @type {string}
|
|
14612
|
+
*/
|
|
14613
|
+
this.operation = null;
|
|
14297
14614
|
|
|
14298
|
-
|
|
14299
|
-
|
|
14300
|
-
|
|
14301
|
-
|
|
14302
|
-
|
|
14303
|
-
|
|
14615
|
+
/**
|
|
14616
|
+
* Requested message mime-type format.
|
|
14617
|
+
* @type {string}
|
|
14618
|
+
* @see exports.messages.MimeTypes
|
|
14619
|
+
*/
|
|
14620
|
+
this.mimetype = null;
|
|
14304
14621
|
};
|
|
14305
14622
|
messages.control.AlertsSubUnsubMessage.prototype = new messages.control.CtrlMessage();
|
|
14306
14623
|
|
|
14307
|
-
/**
|
|
14308
|
-
* Creates Trade notification subscribe message.
|
|
14309
|
-
* @constructor
|
|
14624
|
+
/**
|
|
14625
|
+
* Creates Trade notification subscribe message.
|
|
14626
|
+
* @constructor
|
|
14310
14627
|
*/
|
|
14311
14628
|
|
|
14312
14629
|
messages.control.TradeSubscribeMessage = function () {
|
|
14313
|
-
|
|
14630
|
+
this.init(messages.MessageTypeNames.ctrl.TRADE_SUBSCRIBE);
|
|
14314
14631
|
|
|
14315
|
-
|
|
14316
|
-
|
|
14317
|
-
|
|
14318
|
-
|
|
14319
|
-
|
|
14320
|
-
|
|
14632
|
+
/**
|
|
14633
|
+
* The action the server will taken when receiving this message.
|
|
14634
|
+
* @type {string}
|
|
14635
|
+
* @see exports.messages.control.Action
|
|
14636
|
+
*/
|
|
14637
|
+
this.action = null;
|
|
14321
14638
|
|
|
14322
|
-
|
|
14323
|
-
|
|
14324
|
-
|
|
14325
|
-
|
|
14326
|
-
|
|
14639
|
+
/**
|
|
14640
|
+
* The subscribe/un-subscribe for trade notifications.
|
|
14641
|
+
* @type {Array.<string>}
|
|
14642
|
+
*/
|
|
14643
|
+
this.notificationType = null;
|
|
14327
14644
|
|
|
14328
|
-
|
|
14329
|
-
|
|
14330
|
-
|
|
14331
|
-
|
|
14332
|
-
|
|
14333
|
-
|
|
14645
|
+
/**
|
|
14646
|
+
* Requested message mime-type format.
|
|
14647
|
+
* @type {string}
|
|
14648
|
+
* @see exports.messages.MimeTypes
|
|
14649
|
+
*/
|
|
14650
|
+
this.mimetype = null;
|
|
14334
14651
|
};
|
|
14335
14652
|
messages.control.TradeSubscribeMessage.prototype = new messages.control.CtrlMessage();
|
|
14336
14653
|
|
|
14337
|
-
/**
|
|
14338
|
-
* Base class for response exports.
|
|
14339
|
-
* @abstract
|
|
14654
|
+
/**
|
|
14655
|
+
* Base class for response exports.
|
|
14656
|
+
* @abstract
|
|
14340
14657
|
*/
|
|
14341
14658
|
messages.control.BaseResponse = function () {
|
|
14342
|
-
|
|
14343
|
-
|
|
14344
|
-
|
|
14345
|
-
|
|
14346
|
-
|
|
14347
|
-
|
|
14659
|
+
/**
|
|
14660
|
+
* The response code.
|
|
14661
|
+
* @type {number}
|
|
14662
|
+
* @see {@link messages.control.ResponseCodes}
|
|
14663
|
+
*/
|
|
14664
|
+
this.code = null;
|
|
14348
14665
|
|
|
14349
|
-
|
|
14350
|
-
|
|
14351
|
-
|
|
14352
|
-
|
|
14353
|
-
|
|
14354
|
-
|
|
14666
|
+
/**
|
|
14667
|
+
* The response reason.
|
|
14668
|
+
* @type {string}
|
|
14669
|
+
* @see {@link messages.control.ResponseCodes}
|
|
14670
|
+
*/
|
|
14671
|
+
this.reason = null;
|
|
14355
14672
|
};
|
|
14356
14673
|
messages.control.BaseResponse.prototype = new messages.control.CtrlMessage();
|
|
14357
14674
|
|
|
14358
|
-
/**
|
|
14359
|
-
* Creates a subscribe response message.
|
|
14360
|
-
* @constructor
|
|
14675
|
+
/**
|
|
14676
|
+
* Creates a subscribe response message.
|
|
14677
|
+
* @constructor
|
|
14361
14678
|
*/
|
|
14362
14679
|
messages.control.SubscribeResponse = function () {
|
|
14363
|
-
|
|
14680
|
+
this.init(messages.MessageTypeNames.ctrl.SUBSCRIBE_RESPONSE);
|
|
14364
14681
|
|
|
14365
|
-
|
|
14366
|
-
|
|
14367
|
-
|
|
14368
|
-
|
|
14369
|
-
|
|
14682
|
+
/**
|
|
14683
|
+
*
|
|
14684
|
+
* @type {Array.<messages.control.StreamEntitlement>}
|
|
14685
|
+
*/
|
|
14686
|
+
this.entitlements = null;
|
|
14370
14687
|
|
|
14371
|
-
|
|
14372
|
-
|
|
14373
|
-
|
|
14374
|
-
|
|
14375
|
-
|
|
14688
|
+
/**
|
|
14689
|
+
*
|
|
14690
|
+
* @type {Array.<string>}
|
|
14691
|
+
*/
|
|
14692
|
+
this.invalidsymbols = null;
|
|
14376
14693
|
|
|
14377
|
-
|
|
14378
|
-
|
|
14379
|
-
|
|
14380
|
-
|
|
14381
|
-
|
|
14694
|
+
/**
|
|
14695
|
+
*
|
|
14696
|
+
* @type {Array.<string>}
|
|
14697
|
+
*/
|
|
14698
|
+
this.rejectedsymbols = null;
|
|
14382
14699
|
};
|
|
14383
14700
|
messages.control.SubscribeResponse.prototype = new messages.control.BaseResponse();
|
|
14384
14701
|
|
|
14385
|
-
/**
|
|
14386
|
-
* Creates an exchange subscribe response message.
|
|
14387
|
-
* @constructor
|
|
14702
|
+
/**
|
|
14703
|
+
* Creates an exchange subscribe response message.
|
|
14704
|
+
* @constructor
|
|
14388
14705
|
*/
|
|
14389
14706
|
messages.control.ExchangeSubscribeResponse = function () {
|
|
14390
|
-
|
|
14707
|
+
this.init(messages.MessageTypeNames.ctrl.EXCHANGE_RESPONSE);
|
|
14391
14708
|
};
|
|
14392
14709
|
|
|
14393
14710
|
messages.control.ExchangeSubscribeResponse.prototype = new messages.control.BaseResponse();
|
|
14394
14711
|
|
|
14395
|
-
/**
|
|
14396
|
-
* Creates Trade notification subscribe response message.
|
|
14397
|
-
* @constructor
|
|
14712
|
+
/**
|
|
14713
|
+
* Creates Trade notification subscribe response message.
|
|
14714
|
+
* @constructor
|
|
14398
14715
|
*/
|
|
14399
14716
|
messages.control.TradeSubscribeResponse = function () {
|
|
14400
|
-
|
|
14717
|
+
this.init(messages.MessageTypeNames.ctrl.TRADE_SUBSCRIBE_RESPONSE);
|
|
14401
14718
|
};
|
|
14402
14719
|
|
|
14403
14720
|
messages.control.TradeSubscribeResponse.prototype = new messages.control.BaseResponse();
|
|
14404
14721
|
|
|
14405
|
-
/**
|
|
14406
|
-
* Creates an un-subscribe response message.
|
|
14407
|
-
* @constructor
|
|
14722
|
+
/**
|
|
14723
|
+
* Creates an un-subscribe response message.
|
|
14724
|
+
* @constructor
|
|
14408
14725
|
*/
|
|
14409
14726
|
messages.control.UnsubscribeResponse = function () {
|
|
14410
|
-
|
|
14727
|
+
this.init(messages.MessageTypeNames.ctrl.UNSUBSCRIBE_RESPONSE);
|
|
14411
14728
|
|
|
14412
|
-
|
|
14413
|
-
|
|
14414
|
-
|
|
14415
|
-
|
|
14416
|
-
|
|
14729
|
+
/**
|
|
14730
|
+
*
|
|
14731
|
+
* @type {Array.<messages.control.StreamEntitlement>}
|
|
14732
|
+
*/
|
|
14733
|
+
this.unsubscribed = null;
|
|
14417
14734
|
};
|
|
14418
14735
|
messages.control.UnsubscribeResponse.prototype = new messages.control.BaseResponse();
|
|
14419
14736
|
|
|
14420
|
-
/**
|
|
14421
|
-
* Creates an exchange unsubscribe response message.
|
|
14422
|
-
* @constructor
|
|
14737
|
+
/**
|
|
14738
|
+
* Creates an exchange unsubscribe response message.
|
|
14739
|
+
* @constructor
|
|
14423
14740
|
*/
|
|
14424
14741
|
messages.control.ExchangeUnsubscribeResponse = function () {
|
|
14425
|
-
|
|
14742
|
+
this.init(messages.MessageTypeNames.ctrl.EXCHANGE_UNSUBSCRIBE_RESPONSE);
|
|
14426
14743
|
};
|
|
14427
14744
|
|
|
14428
14745
|
messages.control.ExchangeUnsubscribeResponse.prototype = new messages.control.BaseResponse();
|
|
14429
14746
|
|
|
14430
|
-
/**
|
|
14431
|
-
* Creates an news un-subscribe response message.
|
|
14432
|
-
* @constructor
|
|
14747
|
+
/**
|
|
14748
|
+
* Creates an news un-subscribe response message.
|
|
14749
|
+
* @constructor
|
|
14433
14750
|
*/
|
|
14434
14751
|
messages.control.NewsUnsubscribeResponse = function () {
|
|
14435
|
-
|
|
14752
|
+
this.init(messages.MessageTypeNames.ctrl.NEWS_UNSUBSCRIBE_RESPONSE);
|
|
14436
14753
|
|
|
14437
|
-
|
|
14438
|
-
|
|
14439
|
-
|
|
14440
|
-
|
|
14441
|
-
|
|
14442
|
-
};
|
|
14443
|
-
messages.control.NewsUnsubscribeResponse.prototype = new messages.control.BaseResponse();
|
|
14754
|
+
/**
|
|
14755
|
+
*
|
|
14756
|
+
* @type {Array.<messages.control.StreamEntitlement>}
|
|
14757
|
+
*/
|
|
14758
|
+
this.unsubscribed = null;
|
|
14759
|
+
};
|
|
14760
|
+
messages.control.NewsUnsubscribeResponse.prototype = new messages.control.BaseResponse();
|
|
14444
14761
|
|
|
14445
|
-
/**
|
|
14446
|
-
* Creates Trade notification subscribe response message.
|
|
14447
|
-
* @constructor
|
|
14762
|
+
/**
|
|
14763
|
+
* Creates Trade notification subscribe response message.
|
|
14764
|
+
* @constructor
|
|
14448
14765
|
*/
|
|
14449
14766
|
messages.control.TradeUnsubscribeResponse = function () {
|
|
14450
|
-
|
|
14767
|
+
this.init(messages.MessageTypeNames.ctrl.TRADE_UNSUBSCRIBE_RESPONSE);
|
|
14451
14768
|
};
|
|
14452
14769
|
|
|
14453
14770
|
messages.control.TradeUnsubscribeResponse.prototype = new messages.control.BaseResponse();
|
|
14454
|
-
/**
|
|
14455
|
-
* Creates a stream entitlement info.
|
|
14456
|
-
* @constructor
|
|
14771
|
+
/**
|
|
14772
|
+
* Creates a stream entitlement info.
|
|
14773
|
+
* @constructor
|
|
14457
14774
|
*/
|
|
14458
14775
|
messages.control.StreamEntitlement = function () {
|
|
14459
|
-
|
|
14460
|
-
|
|
14461
|
-
|
|
14462
|
-
|
|
14463
|
-
|
|
14776
|
+
/**
|
|
14777
|
+
* The symbol the entitlement is for.
|
|
14778
|
+
* @type {string}
|
|
14779
|
+
*/
|
|
14780
|
+
this.symbol = null;
|
|
14464
14781
|
|
|
14465
|
-
|
|
14466
|
-
|
|
14467
|
-
|
|
14468
|
-
|
|
14469
|
-
|
|
14470
|
-
|
|
14782
|
+
/**
|
|
14783
|
+
* The market data type the entitlement is for.
|
|
14784
|
+
* @type {string}
|
|
14785
|
+
* @see messages.control.MarketdataType
|
|
14786
|
+
*/
|
|
14787
|
+
this.marketdatatype = null;
|
|
14471
14788
|
|
|
14472
|
-
|
|
14473
|
-
|
|
14474
|
-
|
|
14475
|
-
|
|
14476
|
-
|
|
14477
|
-
|
|
14789
|
+
/**
|
|
14790
|
+
*
|
|
14791
|
+
* @type {string}
|
|
14792
|
+
* @see messages.control.StreamEntitlementType
|
|
14793
|
+
*/
|
|
14794
|
+
this.entitlement = null;
|
|
14478
14795
|
};
|
|
14479
14796
|
|
|
14480
|
-
/**
|
|
14481
|
-
* Creates a new connect response message.
|
|
14482
|
-
* @constructor
|
|
14797
|
+
/**
|
|
14798
|
+
* Creates a new connect response message.
|
|
14799
|
+
* @constructor
|
|
14483
14800
|
*/
|
|
14484
14801
|
messages.control.ConnectResponse = function () {
|
|
14485
|
-
|
|
14802
|
+
this.init(messages.MessageTypeNames.ctrl.CONNECT_RESPONSE);
|
|
14486
14803
|
|
|
14487
|
-
|
|
14488
|
-
|
|
14489
|
-
|
|
14490
|
-
|
|
14491
|
-
|
|
14804
|
+
/**
|
|
14805
|
+
* The server version.
|
|
14806
|
+
* @type {string}
|
|
14807
|
+
*/
|
|
14808
|
+
this.version = null;
|
|
14492
14809
|
|
|
14493
|
-
|
|
14494
|
-
|
|
14495
|
-
|
|
14496
|
-
|
|
14497
|
-
|
|
14810
|
+
/**
|
|
14811
|
+
* The flow control check interval.
|
|
14812
|
+
* @type {number}
|
|
14813
|
+
*/
|
|
14814
|
+
this.flowControlCheckInterval = null;
|
|
14498
14815
|
|
|
14499
|
-
|
|
14500
|
-
|
|
14501
|
-
|
|
14502
|
-
|
|
14503
|
-
|
|
14816
|
+
/**
|
|
14817
|
+
* The server instance connected to.
|
|
14818
|
+
* @type {string}
|
|
14819
|
+
*/
|
|
14820
|
+
this.serverInstance = null;
|
|
14504
14821
|
|
|
14505
|
-
|
|
14506
|
-
|
|
14507
|
-
|
|
14508
|
-
|
|
14509
|
-
|
|
14822
|
+
/**
|
|
14823
|
+
* The conflation rate in milliseconds.
|
|
14824
|
+
* @type {number}
|
|
14825
|
+
*/
|
|
14826
|
+
this.conflationMs = null;
|
|
14510
14827
|
};
|
|
14511
14828
|
messages.control.ConnectResponse.prototype = new messages.control.BaseResponse();
|
|
14512
14829
|
|
|
14513
|
-
/**
|
|
14514
|
-
* Creates a new reconnect response message
|
|
14515
|
-
* @constructor
|
|
14830
|
+
/**
|
|
14831
|
+
* Creates a new reconnect response message
|
|
14832
|
+
* @constructor
|
|
14516
14833
|
*/
|
|
14517
14834
|
messages.control.ReconnectResponse = function () {
|
|
14518
|
-
|
|
14835
|
+
undefined.init(messages.MessageTypeNames.ctrl.RECONNECT_RESPONSE);
|
|
14519
14836
|
|
|
14520
|
-
|
|
14521
|
-
|
|
14522
|
-
|
|
14523
|
-
|
|
14524
|
-
|
|
14837
|
+
/**
|
|
14838
|
+
* The server version.
|
|
14839
|
+
* @type {string}
|
|
14840
|
+
*/
|
|
14841
|
+
undefined.version = null;
|
|
14525
14842
|
|
|
14526
|
-
|
|
14527
|
-
|
|
14528
|
-
|
|
14529
|
-
|
|
14530
|
-
|
|
14843
|
+
/**
|
|
14844
|
+
* The flow control check interval.
|
|
14845
|
+
* @type {number}
|
|
14846
|
+
*/
|
|
14847
|
+
undefined.flowControlCheckInterval = null;
|
|
14531
14848
|
|
|
14532
|
-
|
|
14533
|
-
|
|
14534
|
-
|
|
14535
|
-
|
|
14536
|
-
|
|
14849
|
+
/**
|
|
14850
|
+
* The server instance connected to.
|
|
14851
|
+
* @type {string}
|
|
14852
|
+
*/
|
|
14853
|
+
undefined.serverInstance = null;
|
|
14537
14854
|
|
|
14538
|
-
|
|
14539
|
-
|
|
14540
|
-
|
|
14541
|
-
|
|
14542
|
-
|
|
14855
|
+
/**
|
|
14856
|
+
* The conflation rate in milliseconds.
|
|
14857
|
+
* @type {number}
|
|
14858
|
+
*/
|
|
14859
|
+
undefined.conflationMs = null;
|
|
14543
14860
|
|
|
14544
|
-
|
|
14545
|
-
|
|
14546
|
-
|
|
14547
|
-
|
|
14548
|
-
|
|
14861
|
+
/**
|
|
14862
|
+
* The previous subscriptions
|
|
14863
|
+
* @type {Array.<messages.control.StreamEntitlement>}
|
|
14864
|
+
*/
|
|
14865
|
+
undefined.previousSubscriptions = null;
|
|
14549
14866
|
};
|
|
14550
14867
|
|
|
14551
|
-
/**
|
|
14552
|
-
* Creates a connection response message.
|
|
14553
|
-
* @constructor
|
|
14868
|
+
/**
|
|
14869
|
+
* Creates a connection response message.
|
|
14870
|
+
* @constructor
|
|
14554
14871
|
*/
|
|
14555
14872
|
messages.control.ConnectionClose = function () {
|
|
14556
|
-
|
|
14873
|
+
this.init(messages.MessageTypeNames.ctrl.CONNECTION_CLOSE);
|
|
14557
14874
|
|
|
14558
|
-
|
|
14559
|
-
|
|
14560
|
-
|
|
14561
|
-
|
|
14562
|
-
|
|
14563
|
-
|
|
14875
|
+
/**
|
|
14876
|
+
* The connection close reason code.
|
|
14877
|
+
* @type {number}
|
|
14878
|
+
* @see {@link messages.control.ResponseCodes}
|
|
14879
|
+
*/
|
|
14880
|
+
this.code = null;
|
|
14564
14881
|
|
|
14565
|
-
|
|
14566
|
-
|
|
14567
|
-
|
|
14568
|
-
|
|
14569
|
-
|
|
14570
|
-
|
|
14882
|
+
/**
|
|
14883
|
+
* The connection close reason message.
|
|
14884
|
+
* @type {string}
|
|
14885
|
+
* @see {@link messages.control.ResponseCodes}
|
|
14886
|
+
*/
|
|
14887
|
+
this.reason = null;
|
|
14571
14888
|
};
|
|
14572
14889
|
messages.control.ConnectionClose.prototype = new messages.control.CtrlMessage();
|
|
14573
14890
|
|
|
14574
|
-
/**
|
|
14575
|
-
* Creates a slow connection response message.
|
|
14576
|
-
* @constructor
|
|
14891
|
+
/**
|
|
14892
|
+
* Creates a slow connection response message.
|
|
14893
|
+
* @constructor
|
|
14577
14894
|
*/
|
|
14578
14895
|
messages.control.SlowConnection = function () {
|
|
14579
|
-
|
|
14896
|
+
this.init(messages.MessageTypeNames.ctrl.SLOW_CONNECTION);
|
|
14580
14897
|
|
|
14581
|
-
|
|
14582
|
-
|
|
14583
|
-
|
|
14584
|
-
|
|
14585
|
-
|
|
14898
|
+
/**
|
|
14899
|
+
* The number of times that the connection has exceeded already.
|
|
14900
|
+
* @type {number}
|
|
14901
|
+
*/
|
|
14902
|
+
this.timesExceeded = null;
|
|
14586
14903
|
|
|
14587
|
-
|
|
14588
|
-
|
|
14589
|
-
|
|
14590
|
-
|
|
14591
|
-
|
|
14904
|
+
/**
|
|
14905
|
+
* The max number allowed. The connection may close after reaching this number.
|
|
14906
|
+
* @type {number}
|
|
14907
|
+
*/
|
|
14908
|
+
this.maxExceed = null;
|
|
14592
14909
|
};
|
|
14593
14910
|
messages.control.SlowConnection.prototype = new messages.control.CtrlMessage();
|
|
14594
14911
|
|
|
14595
|
-
/**
|
|
14596
|
-
* Creates a flow control message.
|
|
14597
|
-
* @constructor
|
|
14912
|
+
/**
|
|
14913
|
+
* Creates a flow control message.
|
|
14914
|
+
* @constructor
|
|
14598
14915
|
*/
|
|
14599
14916
|
messages.control.FlowMessage = function () {
|
|
14600
|
-
|
|
14917
|
+
this.init(messages.MessageTypeNames.ctrl.FLOW);
|
|
14601
14918
|
|
|
14602
|
-
|
|
14603
|
-
|
|
14604
|
-
|
|
14605
|
-
|
|
14606
|
-
|
|
14607
|
-
|
|
14919
|
+
/**
|
|
14920
|
+
* Last received sequence number.
|
|
14921
|
+
* @type {number}
|
|
14922
|
+
* @see {@link messages.LongSequence}
|
|
14923
|
+
*/
|
|
14924
|
+
this.sequence = null;
|
|
14608
14925
|
};
|
|
14609
14926
|
messages.control.FlowMessage.prototype = new messages.control.CtrlMessage();
|
|
14610
14927
|
|
|
14611
|
-
/**
|
|
14612
|
-
* Creates an Auth message for Stomp connection Auth verification.
|
|
14613
|
-
* @constructor
|
|
14928
|
+
/**
|
|
14929
|
+
* Creates an Auth message for Stomp connection Auth verification.
|
|
14930
|
+
* @constructor
|
|
14614
14931
|
*/
|
|
14615
14932
|
messages.control.AuthenticationMessage = function () {
|
|
14616
|
-
|
|
14933
|
+
this.init(messages.MessageTypeNames.ctrl.AUTHENTICATION);
|
|
14617
14934
|
|
|
14618
|
-
|
|
14619
|
-
|
|
14620
|
-
|
|
14621
|
-
|
|
14622
|
-
|
|
14935
|
+
/**
|
|
14936
|
+
* Auth method.
|
|
14937
|
+
* @type {String}
|
|
14938
|
+
*/
|
|
14939
|
+
this.authenticationMethod = null;
|
|
14623
14940
|
|
|
14624
|
-
|
|
14625
|
-
|
|
14626
|
-
|
|
14627
|
-
|
|
14628
|
-
|
|
14941
|
+
/**
|
|
14942
|
+
* Auth WMID if using enterprise token auth method we need to have both wmid and authorization.
|
|
14943
|
+
* @type {String}
|
|
14944
|
+
*/
|
|
14945
|
+
this.wmid = null;
|
|
14629
14946
|
|
|
14630
|
-
|
|
14631
|
-
|
|
14632
|
-
|
|
14633
|
-
|
|
14634
|
-
|
|
14947
|
+
/**
|
|
14948
|
+
* Auth token.
|
|
14949
|
+
* @type {String}
|
|
14950
|
+
*/
|
|
14951
|
+
this.authorization = null;
|
|
14635
14952
|
|
|
14636
|
-
|
|
14637
|
-
|
|
14638
|
-
|
|
14639
|
-
|
|
14640
|
-
|
|
14953
|
+
/**
|
|
14954
|
+
* Requested conflation. Null indicates using the default conflation.
|
|
14955
|
+
* @type {number}
|
|
14956
|
+
*/
|
|
14957
|
+
this.conflation = 150;
|
|
14958
|
+
|
|
14959
|
+
/**
|
|
14960
|
+
*
|
|
14961
|
+
* @type {Boolean}
|
|
14962
|
+
*/
|
|
14963
|
+
this.rejectExcessiveConnection = false;
|
|
14641
14964
|
};
|
|
14642
14965
|
messages.control.AuthenticationMessage.prototype = new messages.control.CtrlMessage();
|
|
14643
14966
|
|
|
14644
|
-
/**
|
|
14645
|
-
* Creates a stats response message.
|
|
14646
|
-
* @constructor
|
|
14967
|
+
/**
|
|
14968
|
+
* Creates a stats response message.
|
|
14969
|
+
* @constructor
|
|
14647
14970
|
*/
|
|
14648
14971
|
messages.control.StatsResponse = function () {
|
|
14649
|
-
|
|
14972
|
+
this.init(messages.MessageTypeNames.ctrl.STATS_RESPONSE);
|
|
14650
14973
|
|
|
14651
|
-
|
|
14652
|
-
|
|
14653
|
-
|
|
14654
|
-
|
|
14655
|
-
|
|
14656
|
-
|
|
14657
|
-
|
|
14658
|
-
|
|
14659
|
-
|
|
14660
|
-
|
|
14661
|
-
|
|
14662
|
-
|
|
14663
|
-
|
|
14664
|
-
|
|
14665
|
-
|
|
14666
|
-
|
|
14667
|
-
|
|
14668
|
-
|
|
14669
|
-
|
|
14670
|
-
|
|
14671
|
-
|
|
14672
|
-
|
|
14673
|
-
|
|
14674
|
-
|
|
14675
|
-
|
|
14676
|
-
|
|
14677
|
-
|
|
14678
|
-
|
|
14679
|
-
|
|
14680
|
-
|
|
14681
|
-
|
|
14682
|
-
|
|
14683
|
-
|
|
14684
|
-
|
|
14685
|
-
|
|
14686
|
-
|
|
14687
|
-
|
|
14688
|
-
|
|
14689
|
-
|
|
14690
|
-
|
|
14974
|
+
/**
|
|
14975
|
+
*
|
|
14976
|
+
* @type {number}
|
|
14977
|
+
*/
|
|
14978
|
+
this.numberOfSubscribedSymbolsL1 = null;
|
|
14979
|
+
/**
|
|
14980
|
+
*
|
|
14981
|
+
* @type {number}
|
|
14982
|
+
*/
|
|
14983
|
+
this.numberOfAvailableSymbolsL1 = null;
|
|
14984
|
+
/**
|
|
14985
|
+
*
|
|
14986
|
+
* @type {number}
|
|
14987
|
+
*/
|
|
14988
|
+
this.numberOfSubscribedSymbolsL2 = null;
|
|
14989
|
+
/**
|
|
14990
|
+
*
|
|
14991
|
+
* @type {number}
|
|
14992
|
+
*/
|
|
14993
|
+
this.numberOfAvailableSymbolsL2 = null;
|
|
14994
|
+
/**
|
|
14995
|
+
*
|
|
14996
|
+
* @type {number}
|
|
14997
|
+
*/
|
|
14998
|
+
this.numberOfOpenedConnections = null;
|
|
14999
|
+
/**
|
|
15000
|
+
*
|
|
15001
|
+
* @type {number}
|
|
15002
|
+
*/
|
|
15003
|
+
this.numberOfAvailableConnections = null;
|
|
15004
|
+
/**
|
|
15005
|
+
*
|
|
15006
|
+
* @type {number}
|
|
15007
|
+
*/
|
|
15008
|
+
this.numberOfSubscribedExchanges = null;
|
|
15009
|
+
/**
|
|
15010
|
+
*
|
|
15011
|
+
* @type {number}
|
|
15012
|
+
*/
|
|
15013
|
+
this.numberOfSubscribedTrades = null;
|
|
14691
15014
|
};
|
|
14692
15015
|
messages.control.StatsResponse.prototype = new messages.control.BaseResponse();
|
|
14693
15016
|
|
|
14694
|
-
/**
|
|
14695
|
-
* Creates a Initial Data Sent response message.
|
|
14696
|
-
* @constructor
|
|
15017
|
+
/**
|
|
15018
|
+
* Creates a Initial Data Sent response message.
|
|
15019
|
+
* @constructor
|
|
14697
15020
|
*/
|
|
14698
15021
|
messages.control.InitialDataSent = function () {
|
|
14699
|
-
|
|
15022
|
+
this.init(messages.MessageTypeNames.ctrl.INITIAL_DATA_SENT);
|
|
14700
15023
|
|
|
14701
|
-
|
|
14702
|
-
|
|
14703
|
-
|
|
14704
|
-
|
|
14705
|
-
|
|
14706
|
-
|
|
15024
|
+
/**
|
|
15025
|
+
* The timestamp of message creation.
|
|
15026
|
+
* @type {number|JSBI} for connections with JSON format timestamp will be decoded as number,
|
|
15027
|
+
* for connections with QITCH format - {@link JSBI.BigInt}
|
|
15028
|
+
*/
|
|
15029
|
+
this.timestamp = null;
|
|
14707
15030
|
};
|
|
14708
15031
|
messages.control.InitialDataSent.prototype = new messages.control.CtrlMessage();
|
|
14709
15032
|
|
|
14710
|
-
/**
|
|
14711
|
-
* Creates a Resubscribe message.
|
|
14712
|
-
* @constructor
|
|
15033
|
+
/**
|
|
15034
|
+
* Creates a Resubscribe message.
|
|
15035
|
+
* @constructor
|
|
14713
15036
|
*/
|
|
14714
15037
|
messages.control.ResubscribeMessage = function () {
|
|
14715
|
-
|
|
15038
|
+
this.init(messages.MessageTypeNames.ctrl.RESUBSCRIBE_MESSAGE);
|
|
14716
15039
|
|
|
14717
|
-
|
|
14718
|
-
|
|
14719
|
-
|
|
14720
|
-
|
|
14721
|
-
|
|
14722
|
-
|
|
15040
|
+
/**
|
|
15041
|
+
* The timestamp of message creation.
|
|
15042
|
+
* @type {number|JSBI} for connections with JSON format timestamp will be decoded as number,
|
|
15043
|
+
* for connections with QITCH format - {@link JSBI.BigInt}
|
|
15044
|
+
*/
|
|
15045
|
+
this.timestamp = null;
|
|
14723
15046
|
};
|
|
14724
15047
|
messages.control.ResubscribeMessage.prototype = new messages.control.CtrlMessage();
|
|
14725
15048
|
|
|
14726
|
-
/**
|
|
14727
|
-
* Creates a Missed Data Sent response message.
|
|
14728
|
-
* @constructor
|
|
15049
|
+
/**
|
|
15050
|
+
* Creates a Missed Data Sent response message.
|
|
15051
|
+
* @constructor
|
|
14729
15052
|
*/
|
|
14730
15053
|
messages.control.MissedDataSent = function () {
|
|
14731
|
-
|
|
15054
|
+
this.init(messages.MessageTypeNames.ctrl.MISSED_DATA_SENT);
|
|
14732
15055
|
|
|
14733
|
-
|
|
14734
|
-
|
|
14735
|
-
|
|
14736
|
-
|
|
14737
|
-
|
|
14738
|
-
|
|
15056
|
+
/**
|
|
15057
|
+
* The timestamp of message creation.
|
|
15058
|
+
* @type {number|JSBI} for connections with JSON format timestamp will be decoded as number,
|
|
15059
|
+
* for connections with QITCH format - {@link JSBI.BigInt}
|
|
15060
|
+
*/
|
|
15061
|
+
this.timestamp = null;
|
|
14739
15062
|
};
|
|
14740
15063
|
messages.control.MissedDataSent.prototype = new messages.control.CtrlMessage();
|
|
14741
15064
|
|
|
14742
|
-
/**
|
|
14743
|
-
* Stream entitlement types.
|
|
14744
|
-
* @enum
|
|
14745
|
-
* @readonly
|
|
15065
|
+
/**
|
|
15066
|
+
* Stream entitlement types.
|
|
15067
|
+
* @enum
|
|
15068
|
+
* @readonly
|
|
14746
15069
|
*/
|
|
14747
15070
|
messages.control.StreamEntitlementType = {
|
|
14748
|
-
|
|
14749
|
-
|
|
14750
|
-
|
|
14751
|
-
|
|
14752
|
-
|
|
14753
|
-
|
|
14754
|
-
|
|
14755
|
-
|
|
15071
|
+
RT: "Realtime",
|
|
15072
|
+
RTO: "Realtime CBOE ONE",
|
|
15073
|
+
RTN: "Realtime NASDAQ",
|
|
15074
|
+
RTB: "Realtime BATS",
|
|
15075
|
+
DL: "Delayed",
|
|
15076
|
+
DLO: "Delayed CBOE One",
|
|
15077
|
+
DLN: "Delayed NASDAQ",
|
|
15078
|
+
NA: "Not Entitled"
|
|
14756
15079
|
};
|
|
14757
15080
|
|
|
14758
|
-
/**
|
|
14759
|
-
* Enumeration for subscription actions.
|
|
14760
|
-
* @enum
|
|
14761
|
-
* @readonly
|
|
15081
|
+
/**
|
|
15082
|
+
* Enumeration for subscription actions.
|
|
15083
|
+
* @enum
|
|
15084
|
+
* @readonly
|
|
14762
15085
|
*/
|
|
14763
15086
|
messages.control.Action = {
|
|
14764
|
-
|
|
14765
|
-
|
|
15087
|
+
SUBSCRIBE: "SUBSCRIBE",
|
|
15088
|
+
UNSUBSCRIBE: "UNSUBSCRIBE"
|
|
14766
15089
|
};
|
|
14767
15090
|
|
|
14768
|
-
/**
|
|
14769
|
-
* Enumeration for associations.
|
|
14770
|
-
* @enum
|
|
14771
|
-
* @readonly
|
|
15091
|
+
/**
|
|
15092
|
+
* Enumeration for associations.
|
|
15093
|
+
* @enum
|
|
15094
|
+
* @readonly
|
|
14772
15095
|
*/
|
|
14773
15096
|
messages.control.Association = {
|
|
14774
|
-
|
|
14775
|
-
|
|
14776
|
-
|
|
15097
|
+
AND: "AND",
|
|
15098
|
+
OR: "OR",
|
|
15099
|
+
NOT: "NOT"
|
|
14777
15100
|
};
|
|
14778
15101
|
|
|
14779
|
-
/**
|
|
14780
|
-
* Enumeration for streaming message types.
|
|
14781
|
-
* @enum
|
|
14782
|
-
* @readonly
|
|
15102
|
+
/**
|
|
15103
|
+
* Enumeration for streaming message types.
|
|
15104
|
+
* @enum
|
|
15105
|
+
* @readonly
|
|
15106
|
+
* @deprecated Use the messages.market.SubscriptionTypes along with messages.market.MarketDataResponseTypes
|
|
14783
15107
|
*/
|
|
14784
15108
|
messages.control.MarketdataType = {
|
|
14785
|
-
|
|
14786
|
-
|
|
14787
|
-
|
|
14788
|
-
|
|
14789
|
-
|
|
14790
|
-
|
|
14791
|
-
|
|
14792
|
-
|
|
14793
|
-
|
|
14794
|
-
|
|
14795
|
-
|
|
14796
|
-
|
|
14797
|
-
|
|
14798
|
-
|
|
15109
|
+
QUOTE: "QUOTE",
|
|
15110
|
+
PRICEDATA: "PRICEDATA",
|
|
15111
|
+
TRADE: "TRADE",
|
|
15112
|
+
MMQUOTE: "MMQUOTE",
|
|
15113
|
+
ORDERBOOK: "ORDERBOOK",
|
|
15114
|
+
INTERVAL: "INTERVAL",
|
|
15115
|
+
NETHOUSEPOSITION: "NETHOUSEPOSITION",
|
|
15116
|
+
LASTSALE: "LASTSALE",
|
|
15117
|
+
BOOKORDER: "BOOKORDER",
|
|
15118
|
+
BOOKDELETE: "BOOKDELETE",
|
|
15119
|
+
PURGEBOOK: "PURGEBOOK",
|
|
15120
|
+
LIMITUPLIMITDOWN: "LIMITUPLIMITDOWN",
|
|
15121
|
+
IVGREEKS: "IVGREEKS",
|
|
15122
|
+
IMBALANCESTATUS: "IMBALANCESTATUS"
|
|
14799
15123
|
};
|
|
14800
15124
|
|
|
14801
|
-
/**
|
|
14802
|
-
*
|
|
14803
|
-
* @enum
|
|
14804
|
-
* @readonly
|
|
15125
|
+
/**
|
|
15126
|
+
* Enum for the allowed subscription types
|
|
15127
|
+
* @enum
|
|
15128
|
+
* @readonly
|
|
14805
15129
|
*/
|
|
14806
|
-
messages.
|
|
14807
|
-
|
|
14808
|
-
|
|
15130
|
+
messages.market.SubscriptionTypes = {
|
|
15131
|
+
QUOTE: "QUOTE",
|
|
15132
|
+
PRICEDATA: "PRICEDATA",
|
|
15133
|
+
TRADE: "TRADE",
|
|
15134
|
+
MMQUOTE: "MMQUOTE",
|
|
15135
|
+
ORDERBOOK: "ORDERBOOK",
|
|
15136
|
+
INTERVAL: "INTERVAL",
|
|
15137
|
+
NETHOUSEPOSITION: "NETHOUSEPOSITION",
|
|
15138
|
+
LASTSALE: "LASTSALE",
|
|
15139
|
+
LIMITUPLIMITDOWN: "LIMITUPLIMITDOWN",
|
|
15140
|
+
IVGREEKS: "IVGREEKS",
|
|
15141
|
+
IMBALANCESTATUS: "IMBALANCESTATUS"
|
|
15142
|
+
|
|
15143
|
+
/**
|
|
15144
|
+
* Enum for streamer responses from server
|
|
15145
|
+
* @enum
|
|
15146
|
+
* @readonly
|
|
15147
|
+
*/
|
|
15148
|
+
};messages.market.MarketDataResponseTypes = {
|
|
15149
|
+
QUOTE: "QUOTE",
|
|
15150
|
+
PRICEDATA: "PRICEDATA",
|
|
15151
|
+
TRADE: "TRADE",
|
|
15152
|
+
INTERVAL: "INTERVAL",
|
|
15153
|
+
NETHOUSEPOSITION: "NETHOUSEPOSITION",
|
|
15154
|
+
MMQUOTE: "MMQUOTE",
|
|
15155
|
+
BOOKORDER: "BOOKORDER",
|
|
15156
|
+
PURGEBOOK: "PURGEBOOK",
|
|
15157
|
+
BOOKDELETE: "BOOKDELETE",
|
|
15158
|
+
SYMBOLINFO: "SYMBOLINFO",
|
|
15159
|
+
SYMBOLSTATUS: "SYMBOLSTATUS",
|
|
15160
|
+
DERIVATIVEINFO: "DERIVATIVEINFO",
|
|
15161
|
+
LASTSALE: "LASTSALE",
|
|
15162
|
+
LIMITUPLIMITDOWN: "LIMITUPLIMITDOWN",
|
|
15163
|
+
IVGREEKS: "IVGREEKS",
|
|
15164
|
+
IMBALANCESTATUS: "IMBALANCESTATUS",
|
|
15165
|
+
ALERT: "ALERT",
|
|
15166
|
+
NEWS: "NEWS",
|
|
15167
|
+
TRADENOTIFICATION: "TRADENOTIFICATION",
|
|
15168
|
+
NEWSCMDFILTER: "NEWSCMDFILTER",
|
|
15169
|
+
NEWSERROR: "NEWSERROR",
|
|
15170
|
+
DIVIDEND: "DIVIDEND"
|
|
15171
|
+
|
|
15172
|
+
/**
|
|
15173
|
+
* Response codes and reasons.
|
|
15174
|
+
* @enum
|
|
15175
|
+
* @readonly
|
|
15176
|
+
*/
|
|
15177
|
+
};messages.control.ResponseCodes = {
|
|
15178
|
+
OK_CODE: 200,
|
|
15179
|
+
OK_REASON: "OK",
|
|
14809
15180
|
|
|
14810
|
-
|
|
14811
|
-
|
|
15181
|
+
BADREQUEST_CODE: 400,
|
|
15182
|
+
BADREQUEST_REASON: "Bad Request",
|
|
14812
15183
|
|
|
14813
|
-
|
|
14814
|
-
|
|
15184
|
+
UNAUTHORIZED_CODE: 401,
|
|
15185
|
+
UNAUTHORIZED_REASON: "Unauthorized",
|
|
14815
15186
|
|
|
14816
|
-
|
|
14817
|
-
|
|
15187
|
+
TOOSLOW_CODE: 450,
|
|
15188
|
+
TOOSLOW_REASON: "Too slow",
|
|
14818
15189
|
|
|
14819
|
-
|
|
14820
|
-
|
|
15190
|
+
DATA_SOURCE_RESET: 454,
|
|
15191
|
+
DATA_SOURCE_RESET_REASON: "Data Source Was Reset",
|
|
14821
15192
|
|
|
14822
|
-
|
|
14823
|
-
|
|
15193
|
+
CONNECTION_LIMIT_EXCEEDED_CODE: 452,
|
|
15194
|
+
CONNECTION_LIMIT_EXCEEDED_REASON: "Connection Limit Exceeded",
|
|
14824
15195
|
|
|
14825
|
-
|
|
14826
|
-
|
|
15196
|
+
INTERNALSERVERERROR_CODE: 500,
|
|
15197
|
+
INTERNALSERVERERROR_REASON: "Internal Server Error"
|
|
14827
15198
|
};
|
|
14828
15199
|
|
|
14829
15200
|
/* ****************************************************************************************************************** */
|
|
14830
15201
|
|
|
14831
|
-
/**
|
|
14832
|
-
* Base type for all market data exports.
|
|
14833
|
-
* @constructor
|
|
14834
|
-
* @abstract
|
|
15202
|
+
/**
|
|
15203
|
+
* Base type for all market data exports.
|
|
15204
|
+
* @constructor
|
|
15205
|
+
* @abstract
|
|
14835
15206
|
*/
|
|
14836
15207
|
messages.market.DataMessage = function () {
|
|
14837
|
-
|
|
14838
|
-
|
|
14839
|
-
|
|
14840
|
-
|
|
14841
|
-
|
|
14842
|
-
|
|
15208
|
+
/**
|
|
15209
|
+
* The message type.
|
|
15210
|
+
* @type {number}
|
|
15211
|
+
* @see messages.MessageTypeNames_0.data
|
|
15212
|
+
*/
|
|
15213
|
+
this.messageType = null;
|
|
14843
15214
|
};
|
|
14844
15215
|
messages.market.DataMessage.prototype = new messages.Message();
|
|
14845
15216
|
|
|
14846
|
-
/**
|
|
14847
|
-
*
|
|
14848
|
-
* @constructor
|
|
15217
|
+
/**
|
|
15218
|
+
*
|
|
15219
|
+
* @constructor
|
|
14849
15220
|
*/
|
|
14850
15221
|
messages.market.Quote = function () {
|
|
14851
|
-
|
|
15222
|
+
this.init(messages.MessageTypeNames.data.QUOTE);
|
|
14852
15223
|
|
|
14853
|
-
|
|
15224
|
+
// TODO properties
|
|
14854
15225
|
};
|
|
14855
15226
|
messages.market.Quote.prototype = new messages.market.DataMessage();
|
|
14856
15227
|
|
|
14857
|
-
/**
|
|
14858
|
-
*
|
|
14859
|
-
* @constructor
|
|
15228
|
+
/**
|
|
15229
|
+
*
|
|
15230
|
+
* @constructor
|
|
14860
15231
|
*/
|
|
14861
15232
|
messages.market.PriceData = function () {
|
|
14862
|
-
|
|
15233
|
+
this.init(messages.MessageTypeNames.data.PRICEDATA);
|
|
14863
15234
|
|
|
14864
|
-
|
|
15235
|
+
// TODO properties
|
|
14865
15236
|
};
|
|
14866
15237
|
messages.market.PriceData.prototype = new messages.market.DataMessage();
|
|
14867
15238
|
|
|
14868
|
-
/**
|
|
14869
|
-
*
|
|
14870
|
-
* @constructor
|
|
15239
|
+
/**
|
|
15240
|
+
*
|
|
15241
|
+
* @constructor
|
|
14871
15242
|
*/
|
|
14872
15243
|
messages.market.Trade = function () {
|
|
14873
|
-
|
|
15244
|
+
this.init(messages.MessageTypeNames.data.TRADE);
|
|
14874
15245
|
|
|
14875
|
-
|
|
15246
|
+
// TODO properties
|
|
14876
15247
|
};
|
|
14877
15248
|
messages.market.Trade.prototype = new messages.market.DataMessage();
|
|
14878
15249
|
|
|
14879
|
-
/**
|
|
14880
|
-
*
|
|
14881
|
-
* @constructor
|
|
15250
|
+
/**
|
|
15251
|
+
*
|
|
15252
|
+
* @constructor
|
|
14882
15253
|
*/
|
|
14883
15254
|
messages.market.MMQuote = function () {
|
|
14884
|
-
|
|
15255
|
+
this.init(messages.MessageTypeNames.data.MMQUOTE);
|
|
14885
15256
|
|
|
14886
|
-
|
|
15257
|
+
// TODO properties
|
|
14887
15258
|
};
|
|
14888
15259
|
messages.market.MMQuote.prototype = new messages.market.DataMessage();
|
|
14889
15260
|
|
|
14890
|
-
/**
|
|
14891
|
-
*
|
|
14892
|
-
* @constructor
|
|
15261
|
+
/**
|
|
15262
|
+
*
|
|
15263
|
+
* @constructor
|
|
14893
15264
|
*/
|
|
14894
15265
|
messages.market.PurgeBook = function () {
|
|
14895
|
-
|
|
15266
|
+
this.init(messages.MessageTypeNames.data.PURGEBOOK);
|
|
14896
15267
|
|
|
14897
|
-
|
|
15268
|
+
// TODO properties
|
|
14898
15269
|
};
|
|
14899
15270
|
messages.market.PurgeBook.prototype = new messages.market.DataMessage();
|
|
14900
15271
|
|
|
14901
|
-
/**
|
|
14902
|
-
*
|
|
14903
|
-
* @constructor
|
|
15272
|
+
/**
|
|
15273
|
+
*
|
|
15274
|
+
* @constructor
|
|
14904
15275
|
*/
|
|
14905
15276
|
messages.market.BookOrder = function () {
|
|
14906
|
-
|
|
15277
|
+
this.init(messages.MessageTypeNames.data.BOOKORDER);
|
|
14907
15278
|
|
|
14908
|
-
|
|
15279
|
+
// TODO properties
|
|
14909
15280
|
};
|
|
14910
15281
|
messages.market.BookOrder.prototype = new messages.market.DataMessage();
|
|
14911
15282
|
|
|
14912
|
-
/**
|
|
14913
|
-
*
|
|
14914
|
-
* @constructor
|
|
15283
|
+
/**
|
|
15284
|
+
*
|
|
15285
|
+
* @constructor
|
|
14915
15286
|
*/
|
|
14916
15287
|
messages.market.BookDelete = function () {
|
|
14917
|
-
|
|
15288
|
+
this.init(messages.MessageTypeNames.data.BOOKDELETE);
|
|
14918
15289
|
|
|
14919
|
-
|
|
15290
|
+
// TODO properties
|
|
14920
15291
|
};
|
|
14921
15292
|
messages.market.BookDelete.prototype = new messages.market.DataMessage();
|
|
14922
15293
|
|
|
14923
|
-
/**
|
|
14924
|
-
*
|
|
14925
|
-
* @constructor
|
|
15294
|
+
/**
|
|
15295
|
+
*
|
|
15296
|
+
* @constructor
|
|
14926
15297
|
*/
|
|
14927
15298
|
messages.market.Interval = function () {
|
|
14928
|
-
|
|
15299
|
+
this.init(messages.MessageTypeNames.data.INTERVAL);
|
|
14929
15300
|
|
|
14930
|
-
|
|
15301
|
+
// TODO properties
|
|
14931
15302
|
};
|
|
14932
15303
|
messages.market.Interval.prototype = new messages.market.DataMessage();
|
|
14933
15304
|
|
|
14934
|
-
/**
|
|
14935
|
-
*
|
|
14936
|
-
* @constructor
|
|
15305
|
+
/**
|
|
15306
|
+
*
|
|
15307
|
+
* @constructor
|
|
14937
15308
|
*/
|
|
14938
15309
|
messages.market.NethousePosition = function () {
|
|
14939
|
-
|
|
15310
|
+
this.init(messages.MessageTypeNames.data.NETHOUSEPOSITION);
|
|
14940
15311
|
|
|
14941
|
-
|
|
15312
|
+
// TODO properties
|
|
14942
15313
|
};
|
|
14943
15314
|
messages.market.NethousePosition.prototype = new messages.market.DataMessage();
|
|
14944
15315
|
|
|
14945
|
-
/**
|
|
14946
|
-
*
|
|
14947
|
-
* @constructor
|
|
15316
|
+
/**
|
|
15317
|
+
*
|
|
15318
|
+
* @constructor
|
|
14948
15319
|
*/
|
|
14949
15320
|
messages.market.SymbolInfo = function () {
|
|
14950
|
-
|
|
15321
|
+
this.init(messages.MessageTypeNames.data.SYMBOLINFO);
|
|
14951
15322
|
|
|
14952
|
-
|
|
15323
|
+
// TODO properties
|
|
14953
15324
|
};
|
|
14954
15325
|
messages.market.SymbolInfo.prototype = new messages.market.DataMessage();
|
|
14955
15326
|
|
|
14956
|
-
/**
|
|
14957
|
-
*
|
|
14958
|
-
* @constructor
|
|
15327
|
+
/**
|
|
15328
|
+
*
|
|
15329
|
+
* @constructor
|
|
14959
15330
|
*/
|
|
14960
15331
|
messages.market.SymbolStatus = function () {
|
|
14961
|
-
|
|
15332
|
+
this.init(messages.MessageTypeNames.data.SYMBOLSTATUS);
|
|
14962
15333
|
|
|
14963
|
-
|
|
15334
|
+
// TODO properties
|
|
14964
15335
|
};
|
|
14965
15336
|
messages.market.SymbolStatus.prototype = new messages.market.DataMessage();
|
|
14966
15337
|
|
|
14967
|
-
/**
|
|
14968
|
-
*
|
|
14969
|
-
* @constructor
|
|
15338
|
+
/**
|
|
15339
|
+
*
|
|
15340
|
+
* @constructor
|
|
14970
15341
|
*/
|
|
14971
15342
|
messages.market.DerivativeInfo = function () {
|
|
14972
|
-
|
|
15343
|
+
this.init(messages.MessageTypeNames.data.DERIVATIVEINFO);
|
|
14973
15344
|
|
|
14974
|
-
|
|
15345
|
+
// TODO properties
|
|
14975
15346
|
};
|
|
14976
15347
|
messages.market.DerivativeInfo.prototype = new messages.market.DataMessage();
|
|
14977
15348
|
|
|
14978
|
-
/**
|
|
14979
|
-
*
|
|
14980
|
-
* @constructor
|
|
15349
|
+
/**
|
|
15350
|
+
*
|
|
15351
|
+
* @constructor
|
|
14981
15352
|
*/
|
|
14982
15353
|
messages.market.IVGreeks = function () {
|
|
14983
|
-
|
|
15354
|
+
this.init(messages.MessageTypeNames.data.IVGREEKS);
|
|
14984
15355
|
|
|
14985
|
-
|
|
15356
|
+
// TODO properties
|
|
14986
15357
|
};
|
|
14987
15358
|
messages.market.IVGreeks.prototype = new messages.market.DataMessage();
|
|
14988
15359
|
|
|
14989
|
-
/**
|
|
14990
|
-
*
|
|
14991
|
-
* @constructor
|
|
15360
|
+
/**
|
|
15361
|
+
*
|
|
15362
|
+
* @constructor
|
|
14992
15363
|
*/
|
|
14993
15364
|
messages.market.LastSale = function () {
|
|
14994
|
-
|
|
15365
|
+
this.init(messages.MessageTypeNames.data.LASTSALE);
|
|
14995
15366
|
|
|
14996
|
-
|
|
15367
|
+
// TODO properties
|
|
14997
15368
|
};
|
|
14998
15369
|
messages.market.LastSale.prototype = new messages.market.DataMessage();
|
|
14999
15370
|
|
|
15000
|
-
/**
|
|
15001
|
-
*
|
|
15002
|
-
* @constructor
|
|
15371
|
+
/**
|
|
15372
|
+
*
|
|
15373
|
+
* @constructor
|
|
15003
15374
|
*/
|
|
15004
15375
|
messages.market.LimitUpLimitDown = function () {
|
|
15005
|
-
|
|
15376
|
+
this.init(messages.MessageTypeNames.data.LIMITUPLIMITDOWN);
|
|
15006
15377
|
|
|
15007
|
-
|
|
15378
|
+
// TODO properties
|
|
15008
15379
|
};
|
|
15009
15380
|
messages.market.LimitUpLimitDown.prototype = new messages.market.DataMessage();
|
|
15010
15381
|
|
|
15011
|
-
/**
|
|
15012
|
-
*
|
|
15013
|
-
* @constructor
|
|
15382
|
+
/**
|
|
15383
|
+
*
|
|
15384
|
+
* @constructor
|
|
15014
15385
|
*/
|
|
15015
15386
|
messages.market.ImbalanceStatus = function () {
|
|
15016
|
-
|
|
15387
|
+
this.init(messages.MessageTypeNames.data.IMBALANCESTATUS);
|
|
15017
15388
|
|
|
15018
|
-
|
|
15389
|
+
// TODO properties
|
|
15019
15390
|
};
|
|
15020
15391
|
messages.market.ImbalanceStatus.prototype = new messages.market.DataMessage();
|
|
15021
15392
|
|
|
15022
15393
|
messages.market.Alert = function () {
|
|
15023
|
-
|
|
15394
|
+
this.init(messages.MessageTypeNames.data.ALERT);
|
|
15024
15395
|
|
|
15025
|
-
|
|
15396
|
+
// TODO properties
|
|
15026
15397
|
};
|
|
15027
15398
|
messages.market.Alert.prototype = new messages.market.DataMessage();
|
|
15028
15399
|
|
|
15029
|
-
/**
|
|
15030
|
-
* Enumeration for instrument types.
|
|
15031
|
-
* @enum
|
|
15032
|
-
* @readonly
|
|
15400
|
+
/**
|
|
15401
|
+
* Enumeration for instrument types.
|
|
15402
|
+
* @enum
|
|
15403
|
+
* @readonly
|
|
15033
15404
|
*/
|
|
15034
15405
|
messages.market.InstrumentType = {
|
|
15035
|
-
|
|
15036
|
-
|
|
15037
|
-
|
|
15038
|
-
|
|
15039
|
-
|
|
15040
|
-
|
|
15041
|
-
|
|
15042
|
-
|
|
15043
|
-
|
|
15044
|
-
|
|
15045
|
-
|
|
15046
|
-
|
|
15047
|
-
|
|
15048
|
-
|
|
15049
|
-
|
|
15050
|
-
|
|
15051
|
-
|
|
15052
|
-
|
|
15053
|
-
|
|
15054
|
-
|
|
15406
|
+
1: "CASH",
|
|
15407
|
+
2: "BOND",
|
|
15408
|
+
3: "COMPOSITE",
|
|
15409
|
+
4: "FUTURE",
|
|
15410
|
+
5: "FUTURE_OPTION",
|
|
15411
|
+
6: "FOREX",
|
|
15412
|
+
7: "INDEX",
|
|
15413
|
+
8: "MUTUAL_FUND",
|
|
15414
|
+
9: "MONEY_MARKET_FUND",
|
|
15415
|
+
10: "MARKET_STAT",
|
|
15416
|
+
11: "EQUITY",
|
|
15417
|
+
12: "EQUITY_OPTION",
|
|
15418
|
+
13: "GOVT_BOND",
|
|
15419
|
+
14: "MUNI_BOND",
|
|
15420
|
+
15: "CORP_BOND",
|
|
15421
|
+
16: "ETF",
|
|
15422
|
+
17: "FUTURE_SPREAD",
|
|
15423
|
+
97: "OPTION_ROOT",
|
|
15424
|
+
98: "UNKNOWN",
|
|
15425
|
+
99: "RATE"
|
|
15055
15426
|
};
|
|
15056
15427
|
|
|
15057
|
-
/**
|
|
15058
|
-
* Enumeration vor order side.
|
|
15059
|
-
* @enum
|
|
15060
|
-
* @readonly
|
|
15428
|
+
/**
|
|
15429
|
+
* Enumeration vor order side.
|
|
15430
|
+
* @enum
|
|
15431
|
+
* @readonly
|
|
15061
15432
|
*/
|
|
15062
15433
|
messages.market.OrderSide = {
|
|
15063
|
-
|
|
15064
|
-
|
|
15434
|
+
BUYSIDE: 'B',
|
|
15435
|
+
SELLSIDE: 'S'
|
|
15065
15436
|
};
|
|
15066
15437
|
|
|
15067
|
-
/**
|
|
15068
|
-
* Enumeration for imbalance types.
|
|
15069
|
-
* @enum
|
|
15070
|
-
* @readonly
|
|
15438
|
+
/**
|
|
15439
|
+
* Enumeration for imbalance types.
|
|
15440
|
+
* @enum
|
|
15441
|
+
* @readonly
|
|
15071
15442
|
*/
|
|
15072
15443
|
messages.market.ImbalanceType = {
|
|
15073
|
-
|
|
15074
|
-
|
|
15075
|
-
|
|
15076
|
-
|
|
15077
|
-
|
|
15078
|
-
|
|
15079
|
-
|
|
15080
|
-
|
|
15081
|
-
|
|
15444
|
+
0: "NONE",
|
|
15445
|
+
1: "MARKET",
|
|
15446
|
+
2: "MOC",
|
|
15447
|
+
3: "REGULATORY_IMBALANCE",
|
|
15448
|
+
4: "OPENING_IMBALANCE",
|
|
15449
|
+
5: "CLOSING_IMBALANCE",
|
|
15450
|
+
6: "IPO_IMBALANCE",
|
|
15451
|
+
7: "HALT_IMBALANCE",
|
|
15452
|
+
8: "EQUILIBRIUM"
|
|
15082
15453
|
};
|
|
15083
15454
|
|
|
15084
|
-
/**
|
|
15085
|
-
* Enumeration for book order change types.
|
|
15086
|
-
* @enum
|
|
15087
|
-
* @readonly
|
|
15455
|
+
/**
|
|
15456
|
+
* Enumeration for book order change types.
|
|
15457
|
+
* @enum
|
|
15458
|
+
* @readonly
|
|
15088
15459
|
*/
|
|
15089
15460
|
messages.market.OrderChangeType = {
|
|
15090
|
-
|
|
15091
|
-
|
|
15092
|
-
|
|
15093
|
-
|
|
15461
|
+
'A': "ADD",
|
|
15462
|
+
'M': "MODIFY",
|
|
15463
|
+
'C': "CANCEL",
|
|
15464
|
+
'E': "EXECUTE"
|
|
15094
15465
|
};
|
|
15095
15466
|
}).call(this,require('_process'),typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {},require("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],require("timers").setImmediate,require("timers").clearImmediate,"/lib/streamer-api.js","/lib")
|
|
15096
15467
|
},{"_process":119,"buffer":109,"timers":140}],97:[function(require,module,exports){
|
|
@@ -15419,8 +15790,8 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "d
|
|
|
15419
15790
|
|
|
15420
15791
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
15421
15792
|
|
|
15422
|
-
/*
|
|
15423
|
-
Note: QITCH is currently in a Beta phase and can potentially cause performance degradation
|
|
15793
|
+
/*
|
|
15794
|
+
Note: QITCH is currently in a Beta phase and can potentially cause performance degradation
|
|
15424
15795
|
*/
|
|
15425
15796
|
var QitchTransmitter = function () {
|
|
15426
15797
|
function QitchTransmitter(socket, encoder, log) {
|