aboutsummaryrefslogtreecommitdiffstats
path: root/storage/src/vespa/storageframework/generic/component/componentregister.h
blob: 614b8a87d552d5f5ab3d28b7f02cd60eb5b40e96 (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
// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
/**
 * \class storage::framework::ComponentRegister
 * \ingroup component
 *
 * \brief Application server implements this to get overview of all components.
 *
 * By implementing this class, the application server will get all the
 * components it needs to manage using an interface containing just what it
 * needs to minimize dependencies.
 */
#pragma once

#include <vespa/vespalib/stllike/string.h>

namespace storage::framework {

struct ManagedComponent;

struct ComponentRegister {
    virtual ~ComponentRegister() {}

    virtual void registerComponent(ManagedComponent&) = 0;
    virtual void requestShutdown(vespalib::stringref reason) = 0;
};

}