aboutsummaryrefslogtreecommitdiffstats
path: root/container-search/src/main/java/com/yahoo/search/dispatch/FillInvoker.java
blob: 751f602c417c72ca2ba056b30549391517292015 (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.search.dispatch;

import com.yahoo.search.Result;

/**
 * FillInvoker encapsulates an allocated connection for running a document summary retrieval.
 * The invocation object can be stateful and should not be reused.
 *
 * @author ollivir
 */
public abstract class FillInvoker extends CloseableInvoker {

    /** Retrieves document summaries for the unfilled hits in the given {@link Result} */
    public void fill(Result result, String summaryClass) {
        sendFillRequest(result, summaryClass);
        getFillResults(result, summaryClass);
    }

    protected abstract void getFillResults(Result result, String summaryClass);

    protected abstract void sendFillRequest(Result result, String summaryClass);

}