aboutsummaryrefslogtreecommitdiffstats
path: root/vespaclient-core/src/main/java/com/yahoo/feedapi/JsonFeeder.java
blob: f9aa6ff4a610291cf628894557a56433fe296aa2 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.feedapi;

import java.io.InputStream;

import com.yahoo.document.DocumentTypeManager;
import com.yahoo.document.json.JsonFeedReader;
import com.yahoo.vespaxmlparser.FeedReader;

/**
 * Unpack JSON document operations and push to a feed access point.
 *
 * @author steinar
 */
public class JsonFeeder extends Feeder {
    public JsonFeeder(DocumentTypeManager docMan, SimpleFeedAccess sender, InputStream stream) {
        super(docMan, new VespaFeedSender(sender), stream);
    }

    @Override
    protected FeedReader createReader() throws Exception {
        return new JsonFeedReader(stream, docMan);
    }
}