@ccmaymay/concrete 4.15.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.
@@ -0,0 +1,685 @@
1
+ //
2
+ // Autogenerated by Thrift Compiler (0.15.0)
3
+ //
4
+ // DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
5
+ //
6
+ "use strict";
7
+
8
+ const thrift = require('thrift');
9
+ const Thrift = thrift.Thrift;
10
+ const Int64 = require('node-int64');
11
+
12
+ const communication_ttypes = require('./communication_types');
13
+ const services_ttypes = require('./services_types');
14
+ const structure_ttypes = require('./structure_types');
15
+ const uuid_ttypes = require('./uuid_types');
16
+ const metadata_ttypes = require('./metadata_types');
17
+ const entities_ttypes = require('./entities_types');
18
+
19
+
20
+ const Service = require('./Service');
21
+ const ServiceClient = Service.Client;
22
+ const ServiceProcessor = Service.Processor;
23
+ const ttypes = require('./search_types');
24
+ //HELPER FUNCTIONS AND STRUCTURES
25
+
26
+ const SearchService_search_args = class {
27
+ constructor(args) {
28
+ this.query = null;
29
+ if (args) {
30
+ if (args.query !== undefined && args.query !== null) {
31
+ this.query = new ttypes.SearchQuery(args.query);
32
+ }
33
+ }
34
+ }
35
+
36
+ read (input) {
37
+ input.readStructBegin();
38
+ while (true) {
39
+ const ret = input.readFieldBegin();
40
+ const ftype = ret.ftype;
41
+ const fid = ret.fid;
42
+ if (ftype == Thrift.Type.STOP) {
43
+ break;
44
+ }
45
+ switch (fid) {
46
+ case 1:
47
+ if (ftype == Thrift.Type.STRUCT) {
48
+ this.query = new ttypes.SearchQuery();
49
+ this.query.read(input);
50
+ } else {
51
+ input.skip(ftype);
52
+ }
53
+ break;
54
+ case 0:
55
+ input.skip(ftype);
56
+ break;
57
+ default:
58
+ input.skip(ftype);
59
+ }
60
+ input.readFieldEnd();
61
+ }
62
+ input.readStructEnd();
63
+ return;
64
+ }
65
+
66
+ write (output) {
67
+ output.writeStructBegin('SearchService_search_args');
68
+ if (this.query !== null && this.query !== undefined) {
69
+ output.writeFieldBegin('query', Thrift.Type.STRUCT, 1);
70
+ this.query.write(output);
71
+ output.writeFieldEnd();
72
+ }
73
+ output.writeFieldStop();
74
+ output.writeStructEnd();
75
+ return;
76
+ }
77
+
78
+ };
79
+ const SearchService_search_result = class {
80
+ constructor(args) {
81
+ this.success = null;
82
+ this.ex = null;
83
+ if (args instanceof services_ttypes.ServicesException) {
84
+ this.ex = args;
85
+ return;
86
+ }
87
+ if (args) {
88
+ if (args.success !== undefined && args.success !== null) {
89
+ this.success = new ttypes.SearchResult(args.success);
90
+ }
91
+ if (args.ex !== undefined && args.ex !== null) {
92
+ this.ex = args.ex;
93
+ }
94
+ }
95
+ }
96
+
97
+ read (input) {
98
+ input.readStructBegin();
99
+ while (true) {
100
+ const ret = input.readFieldBegin();
101
+ const ftype = ret.ftype;
102
+ const fid = ret.fid;
103
+ if (ftype == Thrift.Type.STOP) {
104
+ break;
105
+ }
106
+ switch (fid) {
107
+ case 0:
108
+ if (ftype == Thrift.Type.STRUCT) {
109
+ this.success = new ttypes.SearchResult();
110
+ this.success.read(input);
111
+ } else {
112
+ input.skip(ftype);
113
+ }
114
+ break;
115
+ case 1:
116
+ if (ftype == Thrift.Type.STRUCT) {
117
+ this.ex = new services_ttypes.ServicesException();
118
+ this.ex.read(input);
119
+ } else {
120
+ input.skip(ftype);
121
+ }
122
+ break;
123
+ default:
124
+ input.skip(ftype);
125
+ }
126
+ input.readFieldEnd();
127
+ }
128
+ input.readStructEnd();
129
+ return;
130
+ }
131
+
132
+ write (output) {
133
+ output.writeStructBegin('SearchService_search_result');
134
+ if (this.success !== null && this.success !== undefined) {
135
+ output.writeFieldBegin('success', Thrift.Type.STRUCT, 0);
136
+ this.success.write(output);
137
+ output.writeFieldEnd();
138
+ }
139
+ if (this.ex !== null && this.ex !== undefined) {
140
+ output.writeFieldBegin('ex', Thrift.Type.STRUCT, 1);
141
+ this.ex.write(output);
142
+ output.writeFieldEnd();
143
+ }
144
+ output.writeFieldStop();
145
+ output.writeStructEnd();
146
+ return;
147
+ }
148
+
149
+ };
150
+ const SearchService_getCapabilities_args = class {
151
+ constructor(args) {
152
+ }
153
+
154
+ read (input) {
155
+ input.readStructBegin();
156
+ while (true) {
157
+ const ret = input.readFieldBegin();
158
+ const ftype = ret.ftype;
159
+ if (ftype == Thrift.Type.STOP) {
160
+ break;
161
+ }
162
+ input.skip(ftype);
163
+ input.readFieldEnd();
164
+ }
165
+ input.readStructEnd();
166
+ return;
167
+ }
168
+
169
+ write (output) {
170
+ output.writeStructBegin('SearchService_getCapabilities_args');
171
+ output.writeFieldStop();
172
+ output.writeStructEnd();
173
+ return;
174
+ }
175
+
176
+ };
177
+ const SearchService_getCapabilities_result = class {
178
+ constructor(args) {
179
+ this.success = null;
180
+ this.ex = null;
181
+ if (args instanceof services_ttypes.ServicesException) {
182
+ this.ex = args;
183
+ return;
184
+ }
185
+ if (args) {
186
+ if (args.success !== undefined && args.success !== null) {
187
+ this.success = Thrift.copyList(args.success, [ttypes.SearchCapability]);
188
+ }
189
+ if (args.ex !== undefined && args.ex !== null) {
190
+ this.ex = args.ex;
191
+ }
192
+ }
193
+ }
194
+
195
+ read (input) {
196
+ input.readStructBegin();
197
+ while (true) {
198
+ const ret = input.readFieldBegin();
199
+ const ftype = ret.ftype;
200
+ const fid = ret.fid;
201
+ if (ftype == Thrift.Type.STOP) {
202
+ break;
203
+ }
204
+ switch (fid) {
205
+ case 0:
206
+ if (ftype == Thrift.Type.LIST) {
207
+ this.success = [];
208
+ const _rtmp321 = input.readListBegin();
209
+ const _size20 = _rtmp321.size || 0;
210
+ for (let _i22 = 0; _i22 < _size20; ++_i22) {
211
+ let elem23 = null;
212
+ elem23 = new ttypes.SearchCapability();
213
+ elem23.read(input);
214
+ this.success.push(elem23);
215
+ }
216
+ input.readListEnd();
217
+ } else {
218
+ input.skip(ftype);
219
+ }
220
+ break;
221
+ case 1:
222
+ if (ftype == Thrift.Type.STRUCT) {
223
+ this.ex = new services_ttypes.ServicesException();
224
+ this.ex.read(input);
225
+ } else {
226
+ input.skip(ftype);
227
+ }
228
+ break;
229
+ default:
230
+ input.skip(ftype);
231
+ }
232
+ input.readFieldEnd();
233
+ }
234
+ input.readStructEnd();
235
+ return;
236
+ }
237
+
238
+ write (output) {
239
+ output.writeStructBegin('SearchService_getCapabilities_result');
240
+ if (this.success !== null && this.success !== undefined) {
241
+ output.writeFieldBegin('success', Thrift.Type.LIST, 0);
242
+ output.writeListBegin(Thrift.Type.STRUCT, this.success.length);
243
+ for (let iter24 in this.success) {
244
+ if (this.success.hasOwnProperty(iter24)) {
245
+ iter24 = this.success[iter24];
246
+ iter24.write(output);
247
+ }
248
+ }
249
+ output.writeListEnd();
250
+ output.writeFieldEnd();
251
+ }
252
+ if (this.ex !== null && this.ex !== undefined) {
253
+ output.writeFieldBegin('ex', Thrift.Type.STRUCT, 1);
254
+ this.ex.write(output);
255
+ output.writeFieldEnd();
256
+ }
257
+ output.writeFieldStop();
258
+ output.writeStructEnd();
259
+ return;
260
+ }
261
+
262
+ };
263
+ const SearchService_getCorpora_args = class {
264
+ constructor(args) {
265
+ }
266
+
267
+ read (input) {
268
+ input.readStructBegin();
269
+ while (true) {
270
+ const ret = input.readFieldBegin();
271
+ const ftype = ret.ftype;
272
+ if (ftype == Thrift.Type.STOP) {
273
+ break;
274
+ }
275
+ input.skip(ftype);
276
+ input.readFieldEnd();
277
+ }
278
+ input.readStructEnd();
279
+ return;
280
+ }
281
+
282
+ write (output) {
283
+ output.writeStructBegin('SearchService_getCorpora_args');
284
+ output.writeFieldStop();
285
+ output.writeStructEnd();
286
+ return;
287
+ }
288
+
289
+ };
290
+ const SearchService_getCorpora_result = class {
291
+ constructor(args) {
292
+ this.success = null;
293
+ this.ex = null;
294
+ if (args instanceof services_ttypes.ServicesException) {
295
+ this.ex = args;
296
+ return;
297
+ }
298
+ if (args) {
299
+ if (args.success !== undefined && args.success !== null) {
300
+ this.success = Thrift.copyList(args.success, [null]);
301
+ }
302
+ if (args.ex !== undefined && args.ex !== null) {
303
+ this.ex = args.ex;
304
+ }
305
+ }
306
+ }
307
+
308
+ read (input) {
309
+ input.readStructBegin();
310
+ while (true) {
311
+ const ret = input.readFieldBegin();
312
+ const ftype = ret.ftype;
313
+ const fid = ret.fid;
314
+ if (ftype == Thrift.Type.STOP) {
315
+ break;
316
+ }
317
+ switch (fid) {
318
+ case 0:
319
+ if (ftype == Thrift.Type.LIST) {
320
+ this.success = [];
321
+ const _rtmp326 = input.readListBegin();
322
+ const _size25 = _rtmp326.size || 0;
323
+ for (let _i27 = 0; _i27 < _size25; ++_i27) {
324
+ let elem28 = null;
325
+ elem28 = input.readString();
326
+ this.success.push(elem28);
327
+ }
328
+ input.readListEnd();
329
+ } else {
330
+ input.skip(ftype);
331
+ }
332
+ break;
333
+ case 1:
334
+ if (ftype == Thrift.Type.STRUCT) {
335
+ this.ex = new services_ttypes.ServicesException();
336
+ this.ex.read(input);
337
+ } else {
338
+ input.skip(ftype);
339
+ }
340
+ break;
341
+ default:
342
+ input.skip(ftype);
343
+ }
344
+ input.readFieldEnd();
345
+ }
346
+ input.readStructEnd();
347
+ return;
348
+ }
349
+
350
+ write (output) {
351
+ output.writeStructBegin('SearchService_getCorpora_result');
352
+ if (this.success !== null && this.success !== undefined) {
353
+ output.writeFieldBegin('success', Thrift.Type.LIST, 0);
354
+ output.writeListBegin(Thrift.Type.STRING, this.success.length);
355
+ for (let iter29 in this.success) {
356
+ if (this.success.hasOwnProperty(iter29)) {
357
+ iter29 = this.success[iter29];
358
+ output.writeString(iter29);
359
+ }
360
+ }
361
+ output.writeListEnd();
362
+ output.writeFieldEnd();
363
+ }
364
+ if (this.ex !== null && this.ex !== undefined) {
365
+ output.writeFieldBegin('ex', Thrift.Type.STRUCT, 1);
366
+ this.ex.write(output);
367
+ output.writeFieldEnd();
368
+ }
369
+ output.writeFieldStop();
370
+ output.writeStructEnd();
371
+ return;
372
+ }
373
+
374
+ };
375
+ const SearchServiceClient = exports.Client = class SearchServiceClient extends ServiceClient {
376
+ constructor(output, pClass) {
377
+ super(output, pClass);
378
+ this.output = output;
379
+ this.pClass = pClass;
380
+ this._seqid = 0;
381
+ this._reqs = {};
382
+ }
383
+ seqid () { return this._seqid; }
384
+ new_seqid () { return this._seqid += 1; }
385
+
386
+ search (query) {
387
+ this._seqid = this.new_seqid();
388
+ const self = this;
389
+ return new Promise((resolve, reject) => {
390
+ self._reqs[self.seqid()] = (error, result) => {
391
+ return error ? reject(error) : resolve(result);
392
+ };
393
+ self.send_search(query);
394
+ });
395
+ }
396
+
397
+ send_search (query) {
398
+ const output = new this.pClass(this.output);
399
+ const params = {
400
+ query: query
401
+ };
402
+ const args = new SearchService_search_args(params);
403
+ try {
404
+ output.writeMessageBegin('search', Thrift.MessageType.CALL, this.seqid());
405
+ args.write(output);
406
+ output.writeMessageEnd();
407
+ return this.output.flush();
408
+ }
409
+ catch (e) {
410
+ delete this._reqs[this.seqid()];
411
+ if (typeof output.reset === 'function') {
412
+ output.reset();
413
+ }
414
+ throw e;
415
+ }
416
+ }
417
+
418
+ recv_search (input, mtype, rseqid) {
419
+ const callback = this._reqs[rseqid] || function() {};
420
+ delete this._reqs[rseqid];
421
+ if (mtype == Thrift.MessageType.EXCEPTION) {
422
+ const x = new Thrift.TApplicationException();
423
+ x.read(input);
424
+ input.readMessageEnd();
425
+ return callback(x);
426
+ }
427
+ const result = new SearchService_search_result();
428
+ result.read(input);
429
+ input.readMessageEnd();
430
+
431
+ if (null !== result.ex) {
432
+ return callback(result.ex);
433
+ }
434
+ if (null !== result.success) {
435
+ return callback(null, result.success);
436
+ }
437
+ return callback('search failed: unknown result');
438
+ }
439
+
440
+ getCapabilities () {
441
+ this._seqid = this.new_seqid();
442
+ const self = this;
443
+ return new Promise((resolve, reject) => {
444
+ self._reqs[self.seqid()] = (error, result) => {
445
+ return error ? reject(error) : resolve(result);
446
+ };
447
+ self.send_getCapabilities();
448
+ });
449
+ }
450
+
451
+ send_getCapabilities () {
452
+ const output = new this.pClass(this.output);
453
+ const args = new SearchService_getCapabilities_args();
454
+ try {
455
+ output.writeMessageBegin('getCapabilities', Thrift.MessageType.CALL, this.seqid());
456
+ args.write(output);
457
+ output.writeMessageEnd();
458
+ return this.output.flush();
459
+ }
460
+ catch (e) {
461
+ delete this._reqs[this.seqid()];
462
+ if (typeof output.reset === 'function') {
463
+ output.reset();
464
+ }
465
+ throw e;
466
+ }
467
+ }
468
+
469
+ recv_getCapabilities (input, mtype, rseqid) {
470
+ const callback = this._reqs[rseqid] || function() {};
471
+ delete this._reqs[rseqid];
472
+ if (mtype == Thrift.MessageType.EXCEPTION) {
473
+ const x = new Thrift.TApplicationException();
474
+ x.read(input);
475
+ input.readMessageEnd();
476
+ return callback(x);
477
+ }
478
+ const result = new SearchService_getCapabilities_result();
479
+ result.read(input);
480
+ input.readMessageEnd();
481
+
482
+ if (null !== result.ex) {
483
+ return callback(result.ex);
484
+ }
485
+ if (null !== result.success) {
486
+ return callback(null, result.success);
487
+ }
488
+ return callback('getCapabilities failed: unknown result');
489
+ }
490
+
491
+ getCorpora () {
492
+ this._seqid = this.new_seqid();
493
+ const self = this;
494
+ return new Promise((resolve, reject) => {
495
+ self._reqs[self.seqid()] = (error, result) => {
496
+ return error ? reject(error) : resolve(result);
497
+ };
498
+ self.send_getCorpora();
499
+ });
500
+ }
501
+
502
+ send_getCorpora () {
503
+ const output = new this.pClass(this.output);
504
+ const args = new SearchService_getCorpora_args();
505
+ try {
506
+ output.writeMessageBegin('getCorpora', Thrift.MessageType.CALL, this.seqid());
507
+ args.write(output);
508
+ output.writeMessageEnd();
509
+ return this.output.flush();
510
+ }
511
+ catch (e) {
512
+ delete this._reqs[this.seqid()];
513
+ if (typeof output.reset === 'function') {
514
+ output.reset();
515
+ }
516
+ throw e;
517
+ }
518
+ }
519
+
520
+ recv_getCorpora (input, mtype, rseqid) {
521
+ const callback = this._reqs[rseqid] || function() {};
522
+ delete this._reqs[rseqid];
523
+ if (mtype == Thrift.MessageType.EXCEPTION) {
524
+ const x = new Thrift.TApplicationException();
525
+ x.read(input);
526
+ input.readMessageEnd();
527
+ return callback(x);
528
+ }
529
+ const result = new SearchService_getCorpora_result();
530
+ result.read(input);
531
+ input.readMessageEnd();
532
+
533
+ if (null !== result.ex) {
534
+ return callback(result.ex);
535
+ }
536
+ if (null !== result.success) {
537
+ return callback(null, result.success);
538
+ }
539
+ return callback('getCorpora failed: unknown result');
540
+ }
541
+ };
542
+ const SearchServiceProcessor = exports.Processor = class SearchServiceProcessor extends ServiceProcessor {
543
+ constructor(handler) {
544
+ super(handler);
545
+ this._handler = handler;
546
+ }
547
+ process (input, output) {
548
+ const r = input.readMessageBegin();
549
+ if (this['process_' + r.fname]) {
550
+ return this['process_' + r.fname].call(this, r.rseqid, input, output);
551
+ } else {
552
+ input.skip(Thrift.Type.STRUCT);
553
+ input.readMessageEnd();
554
+ const x = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN_METHOD, 'Unknown function ' + r.fname);
555
+ output.writeMessageBegin(r.fname, Thrift.MessageType.EXCEPTION, r.rseqid);
556
+ x.write(output);
557
+ output.writeMessageEnd();
558
+ output.flush();
559
+ }
560
+ }
561
+ process_search (seqid, input, output) {
562
+ const args = new SearchService_search_args();
563
+ args.read(input);
564
+ input.readMessageEnd();
565
+ if (this._handler.search.length === 1) {
566
+ Promise.resolve(this._handler.search.bind(this._handler)(
567
+ args.query
568
+ )).then(result => {
569
+ const result_obj = new SearchService_search_result({success: result});
570
+ output.writeMessageBegin("search", Thrift.MessageType.REPLY, seqid);
571
+ result_obj.write(output);
572
+ output.writeMessageEnd();
573
+ output.flush();
574
+ }).catch(err => {
575
+ let result;
576
+ if (err instanceof services_ttypes.ServicesException) {
577
+ result = new SearchService_search_result(err);
578
+ output.writeMessageBegin("search", Thrift.MessageType.REPLY, seqid);
579
+ } else {
580
+ result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
581
+ output.writeMessageBegin("search", Thrift.MessageType.EXCEPTION, seqid);
582
+ }
583
+ result.write(output);
584
+ output.writeMessageEnd();
585
+ output.flush();
586
+ });
587
+ } else {
588
+ this._handler.search(args.query, (err, result) => {
589
+ let result_obj;
590
+ if ((err === null || typeof err === 'undefined') || err instanceof services_ttypes.ServicesException) {
591
+ result_obj = new SearchService_search_result((err !== null || typeof err === 'undefined') ? err : {success: result});
592
+ output.writeMessageBegin("search", Thrift.MessageType.REPLY, seqid);
593
+ } else {
594
+ result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
595
+ output.writeMessageBegin("search", Thrift.MessageType.EXCEPTION, seqid);
596
+ }
597
+ result_obj.write(output);
598
+ output.writeMessageEnd();
599
+ output.flush();
600
+ });
601
+ }
602
+ }
603
+ process_getCapabilities (seqid, input, output) {
604
+ const args = new SearchService_getCapabilities_args();
605
+ args.read(input);
606
+ input.readMessageEnd();
607
+ if (this._handler.getCapabilities.length === 0) {
608
+ Promise.resolve(this._handler.getCapabilities.bind(this._handler)(
609
+ )).then(result => {
610
+ const result_obj = new SearchService_getCapabilities_result({success: result});
611
+ output.writeMessageBegin("getCapabilities", Thrift.MessageType.REPLY, seqid);
612
+ result_obj.write(output);
613
+ output.writeMessageEnd();
614
+ output.flush();
615
+ }).catch(err => {
616
+ let result;
617
+ if (err instanceof services_ttypes.ServicesException) {
618
+ result = new SearchService_getCapabilities_result(err);
619
+ output.writeMessageBegin("getCapabilities", Thrift.MessageType.REPLY, seqid);
620
+ } else {
621
+ result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
622
+ output.writeMessageBegin("getCapabilities", Thrift.MessageType.EXCEPTION, seqid);
623
+ }
624
+ result.write(output);
625
+ output.writeMessageEnd();
626
+ output.flush();
627
+ });
628
+ } else {
629
+ this._handler.getCapabilities((err, result) => {
630
+ let result_obj;
631
+ if ((err === null || typeof err === 'undefined') || err instanceof services_ttypes.ServicesException) {
632
+ result_obj = new SearchService_getCapabilities_result((err !== null || typeof err === 'undefined') ? err : {success: result});
633
+ output.writeMessageBegin("getCapabilities", Thrift.MessageType.REPLY, seqid);
634
+ } else {
635
+ result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
636
+ output.writeMessageBegin("getCapabilities", Thrift.MessageType.EXCEPTION, seqid);
637
+ }
638
+ result_obj.write(output);
639
+ output.writeMessageEnd();
640
+ output.flush();
641
+ });
642
+ }
643
+ }
644
+ process_getCorpora (seqid, input, output) {
645
+ const args = new SearchService_getCorpora_args();
646
+ args.read(input);
647
+ input.readMessageEnd();
648
+ if (this._handler.getCorpora.length === 0) {
649
+ Promise.resolve(this._handler.getCorpora.bind(this._handler)(
650
+ )).then(result => {
651
+ const result_obj = new SearchService_getCorpora_result({success: result});
652
+ output.writeMessageBegin("getCorpora", Thrift.MessageType.REPLY, seqid);
653
+ result_obj.write(output);
654
+ output.writeMessageEnd();
655
+ output.flush();
656
+ }).catch(err => {
657
+ let result;
658
+ if (err instanceof services_ttypes.ServicesException) {
659
+ result = new SearchService_getCorpora_result(err);
660
+ output.writeMessageBegin("getCorpora", Thrift.MessageType.REPLY, seqid);
661
+ } else {
662
+ result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
663
+ output.writeMessageBegin("getCorpora", Thrift.MessageType.EXCEPTION, seqid);
664
+ }
665
+ result.write(output);
666
+ output.writeMessageEnd();
667
+ output.flush();
668
+ });
669
+ } else {
670
+ this._handler.getCorpora((err, result) => {
671
+ let result_obj;
672
+ if ((err === null || typeof err === 'undefined') || err instanceof services_ttypes.ServicesException) {
673
+ result_obj = new SearchService_getCorpora_result((err !== null || typeof err === 'undefined') ? err : {success: result});
674
+ output.writeMessageBegin("getCorpora", Thrift.MessageType.REPLY, seqid);
675
+ } else {
676
+ result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
677
+ output.writeMessageBegin("getCorpora", Thrift.MessageType.EXCEPTION, seqid);
678
+ }
679
+ result_obj.write(output);
680
+ output.writeMessageEnd();
681
+ output.flush();
682
+ });
683
+ }
684
+ }
685
+ };