@aj-shadow/z-abs-corelayer-server 0.0.0-aj-beta.221

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.
Files changed (87) hide show
  1. package/.gitattributes +26 -0
  2. package/LICENSE.txt +96 -0
  3. package/README.md +5 -0
  4. package/npm-shrinkwrap.json +13 -0
  5. package/package.json +10 -0
  6. package/project/server/_build/Server-CoreLayer-server.bld +12 -0
  7. package/project/server/_build/z-abs-corelayer-server.prj +12 -0
  8. package/project/server/communication/core-protocol/decoder.js +404 -0
  9. package/project/server/communication/core-protocol/encoder.js +503 -0
  10. package/project/server/communication/messages/messages-s-to-c/message-persistent-init-response.js +14 -0
  11. package/project/server/communication/messages/messages-s-to-c/message-persistent-publish.js +16 -0
  12. package/project/server/communication/messages/messages-s-to-c/message-ws-init.js +14 -0
  13. package/project/server/communication/messages/messages-s-to-s/service-init-request.js +17 -0
  14. package/project/server/communication/messages/messages-s-to-s/service-init-response.js +18 -0
  15. package/project/server/communication/messages/messages-s-to-s/service-offer-off.js +15 -0
  16. package/project/server/communication/messages/messages-s-to-s/service-offer-on.js +15 -0
  17. package/project/server/communication/messages/messages-s-to-s/worker-init-request.js +15 -0
  18. package/project/server/data-response.js +588 -0
  19. package/project/server/high-resolution-timestamp.js +36 -0
  20. package/project/server/log/log-config.js +107 -0
  21. package/project/server/log/log-types.js +14 -0
  22. package/project/server/log/logger-console.js +36 -0
  23. package/project/server/log/logger.js +114 -0
  24. package/project/server/node/channel-input.js +65 -0
  25. package/project/server/node/channel-output.js +39 -0
  26. package/project/server/node/clients.js +80 -0
  27. package/project/server/node/connection-address.js +24 -0
  28. package/project/server/node/connection-data-ip.js +82 -0
  29. package/project/server/node/connection-data.js +25 -0
  30. package/project/server/node/const.js +44 -0
  31. package/project/server/node/external-services.js +209 -0
  32. package/project/server/node/http-cache.js +109 -0
  33. package/project/server/node/http-proxy.js +97 -0
  34. package/project/server/node/http-request-handler.js +219 -0
  35. package/project/server/node/http-server.js +36 -0
  36. package/project/server/node/http2-server.js +67 -0
  37. package/project/server/node/https-server.js +63 -0
  38. package/project/server/node/ip-client.js +98 -0
  39. package/project/server/node/ip-server.js +63 -0
  40. package/project/server/node/ip-subscription.js +46 -0
  41. package/project/server/node/message-channel.js +98 -0
  42. package/project/server/node/node-admin.js +513 -0
  43. package/project/server/node/node-data.js +25 -0
  44. package/project/server/node/node-settings.js +352 -0
  45. package/project/server/node/node-worker.js +76 -0
  46. package/project/server/node/node.js +156 -0
  47. package/project/server/node/servers.js +168 -0
  48. package/project/server/node/ws-client.js +12 -0
  49. package/project/server/node/ws-server.js +20 -0
  50. package/project/server/node/ws-web-server.js +52 -0
  51. package/project/server/node/wss-server.js +20 -0
  52. package/project/server/node/wss-web-server.js +82 -0
  53. package/project/server/path/actor-path-build.js +29 -0
  54. package/project/server/path/actor-path-content.js +51 -0
  55. package/project/server/path/actor-path-creator.js +90 -0
  56. package/project/server/path/actor-path-data.js +487 -0
  57. package/project/server/path/actor-path-dist.js +132 -0
  58. package/project/server/path/actor-path-generated.js +202 -0
  59. package/project/server/path/actor-path-project.js +181 -0
  60. package/project/server/path/actor-path.js +57 -0
  61. package/project/server/path/paths/actor-content-paths.js +34 -0
  62. package/project/server/path/paths/actor-data-paths.js +302 -0
  63. package/project/server/path/paths/actor-generated-paths.js +99 -0
  64. package/project/server/path/paths/actor-paths.js +22 -0
  65. package/project/server/plugin-base-multi.js +484 -0
  66. package/project/server/plugin-base.js +233 -0
  67. package/project/server/plugin-component.js +92 -0
  68. package/project/server/plugin-data/client/plugin_data_ClientGet.js +18 -0
  69. package/project/server/plugin-data/dialog-file/plugin_data_DialogFileGet.js +197 -0
  70. package/project/server/plugin-data/platform/plugin_data_PlatformPing.js +19 -0
  71. package/project/server/plugin-factor-protocol.js +35 -0
  72. package/project/server/plugin-factory.js +127 -0
  73. package/project/server/plugin-lock.js +164 -0
  74. package/project/server/response-queue.js +46 -0
  75. package/project/server/responses.js +20 -0
  76. package/project/server/service/plugin-service.js +264 -0
  77. package/project/server/service/service-export.js +47 -0
  78. package/project/server/service/service-manager.js +270 -0
  79. package/project/server/service/service-requests.js +49 -0
  80. package/project/server/session-cache.js +39 -0
  81. package/project/server/session.js +23 -0
  82. package/project/server/worker/worker-channel.js +175 -0
  83. package/project/server/worker/worker-core.js +58 -0
  84. package/project/server/worker/worker-main.js +165 -0
  85. package/project/server/worker/worker-pool.js +94 -0
  86. package/project/server/worker/worker-thread.js +128 -0
  87. package/project/z-abs-corelayer-server.tree +99 -0
@@ -0,0 +1,503 @@
1
+
2
+ 'use strict';
3
+
4
+ const EncoderConst = require('z-abs-corelayer-cs/clientServer/communication/core-protocol/encoder-const');
5
+
6
+
7
+ class Encoder {
8
+ static GuidSize = EncoderConst.GuidSize;
9
+ static Int8Size = EncoderConst.Int8Size;
10
+ static Int16Size = EncoderConst.Int16Size;
11
+ static Int32Size = EncoderConst.Int32Size;
12
+ static Int64Size = EncoderConst.Int64Size;
13
+ static Uint8Size = EncoderConst.Uint8Size;
14
+ static Uint16Size = EncoderConst.Uint16Size;
15
+ static Uint32Size = EncoderConst.Uint32Size;
16
+ static Uint64Size = EncoderConst.Uint64Size;
17
+ static Float32Size = EncoderConst.Float32Size;
18
+ static Float64Size = EncoderConst.Float64Size;
19
+ static CtSize = EncoderConst.CtSize;
20
+
21
+
22
+ static ASCII = [
23
+ -1, -1, -1, -1, -1, -1, -1, -1,
24
+ -1, -1, -1, -1, -1, -1, -1, -1,
25
+ -1, -1, -1, -1, -1, -1, -1, -1,
26
+ -1, -1, -1, -1, -1, -1, -1, -1,
27
+ -1, -1, -1, -1, -1, -1, -1, -1,
28
+ -1, -1, -1, -1, -1, -1, -1, -1,
29
+ 0, 1, 2, 3, 4, 5, 6, 7,
30
+ 8, 9, -1, -1, -1, -1, -1, -1,
31
+ -1, -1, -1, -1, -1, -1, -1, -1,
32
+ -1, -1, -1, -1, -1, -1, -1, -1,
33
+ -1, -1, -1, -1, -1, -1, -1, -1,
34
+ -1, -1, -1, -1, -1, -1, -1, -1,
35
+ -1, 10, 11, 12, 13, 14, 15, -1
36
+ ];
37
+
38
+ constructor(textCache) {
39
+ this.textCache = textCache;
40
+ this.buffer = null;
41
+ this.offset = 0;
42
+ this.doCalculate = false;
43
+ }
44
+
45
+ clear() {
46
+ this.buffer = null;
47
+ this.offset = 0;
48
+ }
49
+
50
+ createBuffer(size) {
51
+ this.buffer = Buffer.allocUnsafe(size);
52
+ return this.buffer;
53
+ }
54
+
55
+ calculate(doCalculate) {
56
+ this.doCalculate = doCalculate;
57
+ this.offset = 0;
58
+ }
59
+
60
+ calculateBytesFromString(s) {
61
+ if(!s) {
62
+ return 0;
63
+ }
64
+ return Buffer.byteLength(s);
65
+ }
66
+
67
+ calculateDynamicBytes(size) {
68
+ if(size <= 253) {
69
+ return 1;
70
+ }
71
+ else if(size <= 65535) {
72
+ return 3;
73
+ }
74
+ else {
75
+ return 5;
76
+ }
77
+ }
78
+
79
+ calculateBytesFromBin(b) {
80
+ return b.byteLength;
81
+ }
82
+
83
+ getStringBytes(s) {
84
+ const size = this.calculateBytesFromString(s);
85
+ return size + this.calculateDynamicBytes(size);
86
+ }
87
+
88
+ getStringArrayBytes(array) {
89
+ let size = this.calculateDynamicBytes(array.length);
90
+ for(let i = 0; i < array.length; ++i) {
91
+ size += this.getStringBytes(array[i]);
92
+ }
93
+ return size;
94
+ }
95
+
96
+ getUint8ArrayBytes(array) {
97
+ let size = 2; // TODO: use dyamic bytes - this.calculateDynamicBytes(array.length);
98
+ size += array.length;
99
+ return size;
100
+ }
101
+
102
+ getGuidArrayBytes(array) {
103
+ return this.calculateDynamicBytes(array.length) + (array.length * EncoderConst.GuidSize);
104
+ }
105
+
106
+ setDynamicBytes(size) {
107
+ const sizeBytes = this.calculateDynamicBytes(size);
108
+ if(1 === sizeBytes) {
109
+ this.setUint8(size);
110
+ }
111
+ else if(3 === sizeBytes) {
112
+ this.setUint8(254);
113
+ this.setUint16(size);
114
+ }
115
+ else {
116
+ this.setUint8(255);
117
+ this.setUint32(size);
118
+ }
119
+ }
120
+
121
+ setInt8(value) {
122
+ if(!this.doCalculate) {
123
+ this.buffer.writeInt8(value, this.offset);
124
+ }
125
+ this.offset += Encoder.Int8Size;
126
+ }
127
+
128
+ setInt16(value) {
129
+ if(!this.doCalculate) {
130
+ this.buffer.writeInt16BE(value, this.offset);
131
+ }
132
+ this.offset += Encoder.Int16Size;
133
+ }
134
+
135
+ setInt32(value) {
136
+ if(!this.doCalculate) {
137
+ this.buffer.writeInt32BE(value, this.offset);
138
+ }
139
+ this.offset += Encoder.Int32Size;
140
+ }
141
+
142
+ setBigInt64(value) {
143
+ if(!this.doCalculate) {
144
+ this.buffer.writeBigInt64BE(value, this.offset);
145
+ }
146
+ this.offset += Encoder.Int64Size;
147
+ }
148
+
149
+ setUint1_0(value, ready) {
150
+ if(!this.doCalculate) {
151
+ const v = 0x7f & this.buffer.readUInt8(this.offset);
152
+ this.buffer.writeUInt8(v + ((0x1 & value) << 7), this.offset);
153
+ if(ready) {
154
+ }
155
+ }
156
+ if(ready) {
157
+ this.offset += Encoder.Int8Size;
158
+ }
159
+ }
160
+
161
+ setUint1_1(value, ready) {
162
+ if(!this.doCalculate) {
163
+ const v = 0xbf & this.buffer.readUInt8(this.offset);
164
+ this.buffer.writeUInt8(v + ((0x1 & value) << 6), this.offset);
165
+ }
166
+ if(ready) {
167
+ this.offset += Encoder.Int8Size;
168
+ }
169
+ }
170
+
171
+ setUint1_2(value, ready) {
172
+ if(!this.doCalculate) {
173
+ const v = 0xdf & this.buffer.readUInt8(this.offset);
174
+ this.buffer.writeUInt8(v + ((0x1 & value) << 5), this.offset);
175
+ }
176
+ if(ready) {
177
+ this.offset += Encoder.Int8Size;
178
+ }
179
+ }
180
+
181
+ setUint1_3(value, ready) {
182
+ if(!this.doCalculate) {
183
+ const v = 0xef & this.buffer.readUInt8(this.offset);
184
+ this.buffer.writeUInt8(v + ((0x1 & value) << 4), this.offset);
185
+ }
186
+ if(ready) {
187
+ this.offset += Encoder.Int8Size;
188
+ }
189
+ }
190
+
191
+ setUint1_4(value, ready) {
192
+ if(!this.doCalculate) {
193
+ const v = 0xf7 & this.buffer.readUInt8(this.offset);
194
+ this.buffer.writeUInt8(v + ((0x1 & value) << 3), this.offset);
195
+ }
196
+ if(ready) {
197
+ this.offset += Encoder.Int8Size;
198
+ }
199
+ }
200
+
201
+ setUint1_5(value, ready) {
202
+ if(!this.doCalculate) {
203
+ const v = 0xfb & this.buffer.readUInt8(this.offset);
204
+ this.buffer.writeUInt8(v + ((0x1 & value) << 2), this.offset);
205
+ }
206
+ if(ready) {
207
+ this.offset += Encoder.Int8Size;
208
+ }
209
+ }
210
+
211
+ setUint1_6(value, ready) {
212
+ if(!this.doCalculate) {
213
+ const v = 0xfd & this.buffer.readUInt8(this.offset);
214
+ this.buffer.writeUInt8(v + ((0x1 & value) << 1), this.offset);
215
+ }
216
+ if(ready) {
217
+ this.offset += Encoder.Int8Size;
218
+ }
219
+ }
220
+
221
+ setUint1_7(value, ready) {
222
+ if(!this.doCalculate) {
223
+ const v = 0xfe & this.buffer.readUInt8(this.offset);
224
+ this.buffer.writeUInt8(v + (0x1 & value), this.offset);
225
+ }
226
+ if(ready) {
227
+ this.offset += Encoder.Int8Size;
228
+ }
229
+ }
230
+
231
+ setUint2_0(value, ready) {
232
+ if(!this.doCalculate) {
233
+ const v = 0x3f & this.buffer.readUInt8(this.offset);
234
+ this.buffer.writeUInt8(v + ((0x3 & value) << 6), this.offset);
235
+ }
236
+ if(ready) {
237
+ this.offset += Encoder.Int8Size;
238
+ }
239
+ }
240
+
241
+ setUint2_1(value, ready) {
242
+ if(!this.doCalculate) {
243
+ const v = 0xcf & this.buffer.readUInt8(this.offset);
244
+ this.buffer.writeUInt8(v + ((0x3 & value) << 4), this.offset);
245
+ }
246
+ if(ready) {
247
+ this.offset += Encoder.Int8Size;
248
+ }
249
+ }
250
+
251
+ setUint2_2(value, ready) {
252
+ if(!this.doCalculate) {
253
+ const v = 0xf3 & this.buffer.readUInt8(this.offset);
254
+ this.buffer.writeUInt8(v + ((0x3 & value) << 2), this.offset);
255
+ }
256
+ if(ready) {
257
+ this.offset += Encoder.Int8Size;
258
+ }
259
+ }
260
+
261
+ setUint2_3(value, ready) {
262
+ if(!this.doCalculate) {
263
+ const v = 0xfc & this.buffer.readUInt8(this.offset);
264
+ this.buffer.writeUInt8(v + (0x3 & value), this.offset);
265
+ }
266
+ if(ready) {
267
+ this.offset += Encoder.Int8Size;
268
+ }
269
+ }
270
+
271
+ setUint4_0(value, ready) {
272
+ if(!this.doCalculate) {
273
+ const v = 0xf & this.buffer.readUInt8(this.offset);
274
+ this.buffer.writeUInt8(v + ((0xf & value) << 4), this.offset);
275
+ }
276
+ if(ready) {
277
+ this.offset += Encoder.Int8Size;
278
+ }
279
+ }
280
+
281
+ setUint4_1(value, ready) {
282
+ if(!this.doCalculate) {
283
+ const v = 0xf0 & this.buffer.readUInt8(this.offset);
284
+ this.buffer.writeUInt8(v + (0xf & value), this.offset);
285
+ }
286
+ if(ready) {
287
+ this.offset += Encoder.Int8Size;
288
+ }
289
+ }
290
+
291
+ setUint8(value) {
292
+ if(!this.doCalculate) {
293
+ this.buffer.writeUInt8(value, this.offset);
294
+ }
295
+ this.offset += Encoder.Uint8Size;
296
+ }
297
+
298
+ setUint16(value) {
299
+ if(!this.doCalculate) {
300
+ this.buffer.writeUInt16BE(value, this.offset);
301
+ }
302
+ this.offset += Encoder.Uint16Size;
303
+ }
304
+
305
+ setUint32(value) {
306
+ if(!this.doCalculate) {
307
+ this.buffer.writeUInt32BE(value, this.offset);
308
+ }
309
+ this.offset += Encoder.Uint32Size;
310
+ }
311
+
312
+ setBigUint64(value) {
313
+ if(!this.doCalculate) {
314
+ this.buffer.writeBigUInt64BE(value, this.offset);
315
+ }
316
+ this.offset += Encoder.Uint64Size;
317
+ }
318
+
319
+ setFloat32(value) {
320
+ if(!this.doCalculate) {
321
+ this.buffer.writeFloatBE(value, this.offset);
322
+ }
323
+ this.offset += Encoder.Float32Size;
324
+ }
325
+
326
+ setFloat64(value) {
327
+ if(!this.doCalculate) {
328
+ this.buffer.writeDoubleBE(value, this.offset);
329
+ }
330
+ this.offset += Encoder.Float364Size;
331
+ }
332
+
333
+ setBool1_0(value, ready) {
334
+ this.setUint1_0(value ? 0x1 : 0x0, ready);
335
+ }
336
+
337
+ setBool1_1(value, ready) {
338
+ this.setUint1_1(value ? 0x1 : 0x0, ready);
339
+ }
340
+
341
+ setBool1_2(value, ready) {
342
+ this.setUint1_2(value ? 0x1 : 0x0, ready);
343
+ }
344
+
345
+ setBool1_3(value, ready) {
346
+ this.setUint1_3(value ? 0x1 : 0x0, ready);
347
+ }
348
+
349
+ setBool1_4(value, ready) {
350
+ this.setUint1_4(value ? 0x1 : 0x0, ready);
351
+ }
352
+
353
+ setBool1_5(value, ready) {
354
+ this.setUint1_5(value ? 0x1 : 0x0, ready);
355
+ }
356
+
357
+ setBool1_6(value, ready) {
358
+ this.setUint1_6(value ? 0x1 : 0x0, ready);
359
+ }
360
+
361
+ setBool1_7(value, ready) {
362
+ this.setUint1_7(value ? 0x1 : 0x0, ready);
363
+ }
364
+
365
+ _setCt(value) {
366
+ if(!this.doCalculate) {
367
+ this.buffer.writeInt16BE(value, this.offset);
368
+ }
369
+ this.offset += Encoder.CtSize;
370
+ }
371
+
372
+ setCtString(text, cachedTexts) {
373
+ if(!this.doCalculate) {
374
+ if(!text) {
375
+ text = '';
376
+ }
377
+ const ctId = this.textCache.setExternal(text, cachedTexts);
378
+ this._setCt(ctId);
379
+ }
380
+ else {
381
+ this.offset += Encoder.CtSize;
382
+ }
383
+ }
384
+
385
+ setCtStringArray(array, cachedTexts) {
386
+ this.setUint16(array.length);
387
+ for(let i = 0; i < array.length; ++i) {
388
+ this.setCtString(array[i], cachedTexts);
389
+ }
390
+ }
391
+
392
+ setCtStringInternal(text) {
393
+ if(!this.doCalculate) {
394
+ const ctId = this.textCache.setInternal(text);
395
+ this._setCt(ctId);
396
+ }
397
+ else {
398
+ this.offset += Encoder.CtSize;
399
+ }
400
+ }
401
+
402
+ setCtStringArrayInternal(array) {
403
+ this.setUint16(array.length);
404
+ for(let i = 0; i < array.length; ++i) {
405
+ this.setCtStringInternal(array[i]);
406
+ }
407
+ }
408
+
409
+ setRawString(value, size) {
410
+ if(!this.doCalculate) {
411
+ if(0 !== size) {
412
+ this.offset += this.buffer.write(value, this.offset, size);
413
+ }
414
+ }
415
+ else {
416
+ this.offset += size;
417
+ }
418
+ }
419
+
420
+ setString(value) {
421
+ const stringBytes = this.calculateBytesFromString(value);
422
+ this.setDynamicBytes(stringBytes);
423
+ this.setRawString(value, stringBytes);
424
+ }
425
+
426
+ setStringArray(array) {
427
+ this.setDynamicBytes(array.length);
428
+ for(let i = 0; i < array.length; ++i) {
429
+ this.setString(array[i]);
430
+ }
431
+ }
432
+
433
+ setRawBinary(value, size) {
434
+ if(!this.doCalculate) {
435
+ this.offset += value.copy(this.buffer, this.offset, 0, size);
436
+ }
437
+ else {
438
+ this.offset += size;
439
+ }
440
+ }
441
+
442
+ setBinary(value) {
443
+ const binaryBytes = value.byteLength;
444
+ this.setDynamicBytes(binaryBytes);
445
+ this.setRawBinary(value, binaryBytes);
446
+ }
447
+
448
+ setUint8Array(array) {
449
+ this.setUint16(array.length);
450
+ for(let i = 0; i < array.length; ++i) {
451
+ this.setUint8(array[i]);
452
+ }
453
+ }
454
+
455
+ setGuid(value) {
456
+ this.setUint4_0(Encoder.ASCII[value.charCodeAt(0)]);
457
+ this.setUint4_1(Encoder.ASCII[value.charCodeAt(1)], true);
458
+ this.setUint4_0(Encoder.ASCII[value.charCodeAt(2)]);
459
+ this.setUint4_1(Encoder.ASCII[value.charCodeAt(3)], true);
460
+ this.setUint4_0(Encoder.ASCII[value.charCodeAt(4)]);
461
+ this.setUint4_1(Encoder.ASCII[value.charCodeAt(5)], true);
462
+ this.setUint4_0(Encoder.ASCII[value.charCodeAt(6)]);
463
+ this.setUint4_1(Encoder.ASCII[value.charCodeAt(7)], true);
464
+
465
+ this.setUint4_0(Encoder.ASCII[value.charCodeAt(9)]);
466
+ this.setUint4_1(Encoder.ASCII[value.charCodeAt(10)], true);
467
+ this.setUint4_0(Encoder.ASCII[value.charCodeAt(11)]);
468
+ this.setUint4_1(Encoder.ASCII[value.charCodeAt(12)], true);
469
+
470
+ this.setUint4_0(Encoder.ASCII[value.charCodeAt(14)]);
471
+ this.setUint4_1(Encoder.ASCII[value.charCodeAt(15)], true);
472
+ this.setUint4_0(Encoder.ASCII[value.charCodeAt(16)]);
473
+ this.setUint4_1(Encoder.ASCII[value.charCodeAt(17)], true);
474
+
475
+ this.setUint4_0(Encoder.ASCII[value.charCodeAt(19)]);
476
+ this.setUint4_1(Encoder.ASCII[value.charCodeAt(20)], true);
477
+ this.setUint4_0(Encoder.ASCII[value.charCodeAt(21)]);
478
+ this.setUint4_1(Encoder.ASCII[value.charCodeAt(22)], true);
479
+
480
+ this.setUint4_0(Encoder.ASCII[value.charCodeAt(24)]);
481
+ this.setUint4_1(Encoder.ASCII[value.charCodeAt(25)], true);
482
+ this.setUint4_0(Encoder.ASCII[value.charCodeAt(26)]);
483
+ this.setUint4_1(Encoder.ASCII[value.charCodeAt(27)], true);
484
+ this.setUint4_0(Encoder.ASCII[value.charCodeAt(28)]);
485
+ this.setUint4_1(Encoder.ASCII[value.charCodeAt(29)], true);
486
+ this.setUint4_0(Encoder.ASCII[value.charCodeAt(30)]);
487
+ this.setUint4_1(Encoder.ASCII[value.charCodeAt(31)], true);
488
+ this.setUint4_0(Encoder.ASCII[value.charCodeAt(32)]);
489
+ this.setUint4_1(Encoder.ASCII[value.charCodeAt(33)], true);
490
+ this.setUint4_0(Encoder.ASCII[value.charCodeAt(34)]);
491
+ this.setUint4_1(Encoder.ASCII[value.charCodeAt(35)], true);
492
+ }
493
+
494
+ setGuidArray(array) {
495
+ this.setDynamicBytes(array.length);
496
+ for(let i = 0; i < array.length; ++i) {
497
+ this.setGuid(array[i]);
498
+ }
499
+ }
500
+ }
501
+
502
+
503
+ module.exports = Encoder;
@@ -0,0 +1,14 @@
1
+
2
+ 'use strict';
3
+
4
+ const CoreProtocolConst = require('z-abs-corelayer-cs/clientServer/communication/core-protocol/core-protocol-const');
5
+
6
+
7
+ class MessagePersistentInitResponse {
8
+ constructor() {
9
+ this.msgId = CoreProtocolConst.PERSISTENT_INIT_RESPONSE;
10
+ }
11
+ }
12
+
13
+
14
+ module.exports = MessagePersistentInitResponse;
@@ -0,0 +1,16 @@
1
+
2
+ 'use strict';
3
+
4
+ const CoreProtocolConst = require('z-abs-corelayer-cs/clientServer/communication/core-protocol/core-protocol-const');
5
+
6
+
7
+ class MessagePersistentPublish {
8
+ constructor(storeName, data) {
9
+ this.msgId = CoreProtocolConst.PERSISTENT_PUBLISH;
10
+ this.storeName = storeName;
11
+ this.data = data;
12
+ }
13
+ }
14
+
15
+
16
+ module.exports = MessagePersistentPublish;
@@ -0,0 +1,14 @@
1
+
2
+ 'use strict';
3
+
4
+ const CoreProtocolConst = require('z-abs-corelayer-cs/clientServer/communication/core-protocol/core-protocol-const');
5
+
6
+
7
+ class MessageWsInit {
8
+ constructor() {
9
+ this.msgId = CoreProtocolConst.WS_INIT;
10
+ }
11
+ }
12
+
13
+
14
+ module.exports = MessageWsInit;
@@ -0,0 +1,17 @@
1
+
2
+ 'use strict';
3
+
4
+ const CoreProtocolConst = require('z-abs-corelayer-cs/clientServer/communication/core-protocol/core-protocol-const');
5
+
6
+
7
+ class ServiceInitRequest {
8
+ constructor(nodeName, nodeId, nodeType) {
9
+ this.msgId = CoreProtocolConst.SERVICE_INIT_REQUEST;
10
+ this.nodeName = nodeName;
11
+ this.nodeId = nodeId;
12
+ this.nodeType = nodeType;
13
+ }
14
+ }
15
+
16
+
17
+ module.exports = ServiceInitRequest;
@@ -0,0 +1,18 @@
1
+
2
+ 'use strict';
3
+
4
+ const CoreProtocolConst = require('z-abs-corelayer-cs/clientServer/communication/core-protocol/core-protocol-const');
5
+
6
+
7
+ class ServiceInitResponse {
8
+ constructor(nodeName, nodeId, nodeType, serviceExport) {
9
+ this.msgId = CoreProtocolConst.SERVICE_INIT_RESPONSE;
10
+ this.nodeName = nodeName;
11
+ this.nodeId = nodeId;;
12
+ this.nodeType = nodeType;
13
+ this.serviceExport = serviceExport;
14
+ }
15
+ }
16
+
17
+
18
+ module.exports = ServiceInitResponse;
@@ -0,0 +1,15 @@
1
+
2
+ 'use strict';
3
+
4
+ const CoreProtocolConst = require('z-abs-corelayer-cs/clientServer/communication/core-protocol/core-protocol-const');
5
+
6
+
7
+ class ServiceOfferOff {
8
+ constructor(serviceExport) {
9
+ this.msgId = CoreProtocolConst.SERVICE_OFFER_OFF;
10
+ this.serviceExport = serviceExport;
11
+ }
12
+ }
13
+
14
+
15
+ module.exports = ServiceOfferOff;
@@ -0,0 +1,15 @@
1
+
2
+ 'use strict';
3
+
4
+ const CoreProtocolConst = require('z-abs-corelayer-cs/clientServer/communication/core-protocol/core-protocol-const');
5
+
6
+
7
+ class ServiceOfferOn {
8
+ constructor(serviceExport) {
9
+ this.msgId = CoreProtocolConst.SERVICE_OFFER_ON;
10
+ this.serviceExport = serviceExport;
11
+ }
12
+ }
13
+
14
+
15
+ module.exports = ServiceOfferOn;
@@ -0,0 +1,15 @@
1
+
2
+ 'use strict';
3
+
4
+ const CoreProtocolConst = require('z-abs-corelayer-cs/clientServer/communication/core-protocol/core-protocol-const');
5
+
6
+
7
+ class WorkerInitRequest {
8
+ constructor(sessionData) {
9
+ this.msgId = CoreProtocolConst.WORKER_INIT_REQUEST;
10
+ this.sessionData = sessionData;
11
+ }
12
+ }
13
+
14
+
15
+ module.exports = WorkerInitRequest;