@@ -84,7 +84,7 @@ public MessageFormat.Writer newWriter( PackOutput output, boolean byteArraySuppo
84
84
@ Override
85
85
public MessageFormat .Reader newReader ( PackInput input )
86
86
{
87
- return new Reader ( input , input . messageBoundaryHook () );
87
+ return new Reader ( input );
88
88
}
89
89
90
90
@ Override
@@ -370,12 +370,10 @@ private void packProperties( Entity entity ) throws IOException
370
370
public static class Reader implements MessageFormat .Reader
371
371
{
372
372
private final PackStream .Unpacker unpacker ;
373
- private final Runnable onMessageComplete ;
374
373
375
- public Reader ( PackInput input , Runnable onMessageComplete )
374
+ public Reader ( PackInput input )
376
375
{
377
376
unpacker = new PackStream .Unpacker ( input );
378
- this .onMessageComplete = onMessageComplete ;
379
377
}
380
378
381
379
@ Override
@@ -429,19 +427,16 @@ public void read( MessageHandler handler ) throws IOException
429
427
private void unpackResetMessage ( MessageHandler handler ) throws IOException
430
428
{
431
429
handler .handleResetMessage ();
432
- onMessageComplete .run ();
433
430
}
434
431
435
432
private void unpackInitMessage ( MessageHandler handler ) throws IOException
436
433
{
437
434
handler .handleInitMessage ( unpacker .unpackString (), unpackMap () );
438
- onMessageComplete .run ();
439
435
}
440
436
441
437
private void unpackIgnoredMessage ( MessageHandler output ) throws IOException
442
438
{
443
439
output .handleIgnoredMessage ();
444
- onMessageComplete .run ();
445
440
}
446
441
447
442
private void unpackFailureMessage ( MessageHandler output ) throws IOException
@@ -450,34 +445,29 @@ private void unpackFailureMessage( MessageHandler output ) throws IOException
450
445
String code = params .get ( "code" ).asString ();
451
446
String message = params .get ( "message" ).asString ();
452
447
output .handleFailureMessage ( code , message );
453
- onMessageComplete .run ();
454
448
}
455
449
456
450
private void unpackRunMessage ( MessageHandler output ) throws IOException
457
451
{
458
452
String statement = unpacker .unpackString ();
459
453
Map <String ,Value > params = unpackMap ();
460
454
output .handleRunMessage ( statement , params );
461
- onMessageComplete .run ();
462
455
}
463
456
464
457
private void unpackDiscardAllMessage ( MessageHandler output ) throws IOException
465
458
{
466
459
output .handleDiscardAllMessage ();
467
- onMessageComplete .run ();
468
460
}
469
461
470
462
private void unpackPullAllMessage ( MessageHandler output ) throws IOException
471
463
{
472
464
output .handlePullAllMessage ();
473
- onMessageComplete .run ();
474
465
}
475
466
476
467
private void unpackSuccessMessage ( MessageHandler output ) throws IOException
477
468
{
478
469
Map <String ,Value > map = unpackMap ();
479
470
output .handleSuccessMessage ( map );
480
- onMessageComplete .run ();
481
471
}
482
472
483
473
private void unpackRecordMessage (MessageHandler output ) throws IOException
@@ -489,7 +479,6 @@ private void unpackRecordMessage(MessageHandler output) throws IOException
489
479
fields [i ] = unpackValue ();
490
480
}
491
481
output .handleRecordMessage ( fields );
492
- onMessageComplete .run ();
493
482
}
494
483
495
484
private Value unpackValue () throws IOException
0 commit comments