aboutsummaryrefslogtreecommitdiffstats
path: root/slobrok/src/vespa/slobrok/server/named_service.h
blob: cb7addfeb0c62b54a289f3499f247edb118f9f31 (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
34
35
36
37
38
// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
#pragma once

#include <string>

namespace slobrok {

//-----------------------------------------------------------------------------

/**
 * @class NamedService
 * @brief Represents a server with a name and a connection specification.
 *
 * a NamedService is always part of a collection implementing the
 * IRpcSrvCollection interface.
 **/

class NamedService
{
protected:
    std::string           _name;
    std::string           _spec;

public:
    NamedService(const NamedService &) = delete;
    NamedService &operator=(const NamedService &) = delete;

    NamedService(const std::string & name, const std::string & spec);
    virtual ~NamedService();

    const std::string & getName() const { return _name; }
    const std::string & getSpec() const { return _spec; }
};

//-----------------------------------------------------------------------------

} // namespace slobrok