aboutsummaryrefslogtreecommitdiffstats
path: root/messagebus/src/vespa/messagebus/ireplyhandler.h
blob: 70ea9d31e0004704f179234f7d93c76ccb6444b0 (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
29
30
31
32
33
// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
#pragma once

#include <memory>

namespace mbus {

class Reply;

/**
 * This interface is implemented by application components that want
 * to handle incoming replies received from either an
 * IntermediateSession or a SourceSession.
 **/
class IReplyHandler
{
protected:
    IReplyHandler() = default;
public:
    IReplyHandler(const IReplyHandler &) = delete;
    IReplyHandler & operator = (const IReplyHandler &) = delete;
    virtual ~IReplyHandler() {}

    /**
     * This method is invoked by messagebus to deliver a Reply.
     *
     * @param reply the Reply being delivered
     **/
    virtual void handleReply(std::unique_ptr<Reply> reply) = 0;
};

} // namespace mbus