class ResultHandler extends MessageProcessingHandler {

    @Override
    public void onRecords( final BoltResult result, final boolean pull ) throws Exception
    {
        result.accept( new BoltResult.Visitor()
        {
            @Override
            public void visit( QueryResult.Record record ) throws Exception
            {
                if ( pull )
                {
                    messageWriter.write( new RecordMessage( record ) );
                }
            }

            @Override
            public void addMetadata( String key, AnyValue value )
            {
                onMetadata( key, value );
            }
        } );
    }

    public  ResultHandler( BoltResponseMessageWriter handler, BoltConnection connection, Log log );

}