cpp-msgpack-rpc 0.2.0
An RPC library implementing MessagePack RPC.
Loading...
Searching...
No Matches
i_server_impl.h
Go to the documentation of this file.
1/*
2 * Copyright 2023 MusicScience37 (Kenta Kabashima)
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
20#pragma once
21
22#include <memory>
23#include <vector>
24
27
29
33class IServerImpl {
34public:
38 virtual void stop() = 0;
39
45 virtual void run_until_signal() = 0;
46
52 [[nodiscard]] virtual std::vector<addresses::URI> local_endpoint_uris() = 0;
53
62 [[nodiscard]] virtual std::shared_ptr<executors::IExecutor> executor() = 0;
63
64 IServerImpl(const IServerImpl&) = delete;
65 IServerImpl(IServerImpl&&) = delete;
66 IServerImpl& operator=(const IServerImpl&) = delete;
67 IServerImpl& operator=(IServerImpl&&) = delete;
68
70 virtual ~IServerImpl() noexcept = default;
71
72protected:
74 IServerImpl() noexcept = default;
75};
76
77} // namespace msgpack_rpc::servers::impl
virtual std::vector< addresses::URI > local_endpoint_uris()=0
Get the URIs of the local endpoints in this server.
virtual void run_until_signal()=0
Run processing of this server until SIGINT or SIGTERM is received.
virtual ~IServerImpl() noexcept=default
Destructor.
virtual std::shared_ptr< executors::IExecutor > executor()=0
Get the executor.
virtual void stop()=0
Stop processing of this server.
IServerImpl() noexcept=default
Constructor.
Definition of IExecutor class.
Namespace of internal implementation.
Definition of URI class.