aboutsummaryrefslogtreecommitdiffstats
path: root/slobrok/src/vespa/slobrok/server/request_completion_handler.h
blob: dd3040a0dfc9de69e2979e12225e31440ba97628 (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
25
26
27
28
// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.

#pragma once

#include "ok_state.h"

class FRT_RPCRequest;

namespace slobrok {

/**
 * Interface used to signal the result of LocalRpcMonitorMap::addLocal()
 **/
struct CompletionHandler {
    virtual void doneHandler(OkState result) = 0;
    virtual ~CompletionHandler() {}
};

class RequestCompletionHandler : public CompletionHandler {
private:
    FRT_RPCRequest *_parentRequest;
public:
    RequestCompletionHandler(FRT_RPCRequest *parentRequest);
    virtual ~RequestCompletionHandler();
    void doneHandler(OkState result) override;
};

}