blob: e08c55e8f6ec8e00889cbdec1ec7c9e96a6e429e (
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
|
// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
#pragma once
#include "context.h"
namespace mbus {
/**
* This interface is implemented by application components that require special
* handling when discarding a message with a non-empty callstack.
*/
class IDiscardHandler
{
public:
/**
* Virtual destructor required for inheritance.
*/
virtual ~IDiscardHandler() = default;
/**
* This method is invoked by message bus when a routable is being
* dicarded. This is invoked INSTEAD of the corresponding {@link
* ReplyHandler}.
*
* @param ctx The context of the discarded reply.
*/
virtual void handleDiscard(Context ctx) = 0;
};
} // namespace mbus
|