27#include "msgpack_rpc/impl/msgpack_rpc_export.h"
38class IServerBuilderImpl {
46 std::shared_ptr<transport::IBackend> backend) = 0;
60 virtual void add_method(std::unique_ptr<methods::IMethod> method) = 0;
67 [[nodiscard]]
virtual std::unique_ptr<IServerImpl>
build() = 0;
74 [[nodiscard]]
virtual std::shared_ptr<logging::Logger>
logger() = 0;
78 IServerBuilderImpl& operator=(
const IServerBuilderImpl&) =
delete;
79 IServerBuilderImpl& operator=(IServerBuilderImpl&&) =
delete;
86 IServerBuilderImpl() noexcept = default;
96[[nodiscard]] MSGPACK_RPC_EXPORT
std::unique_ptr<IServerBuilderImpl>
108[[nodiscard]] MSGPACK_RPC_EXPORT
std::unique_ptr<IServerBuilderImpl>
Class of URIs (Uniform Resource Identifiers) to specify endpoints in this library.
virtual void register_protocol(std::shared_ptr< transport::IBackend > backend)=0
Register a protocol.
virtual std::unique_ptr< IServerImpl > build()=0
Build a server.
virtual std::shared_ptr< logging::Logger > logger()=0
Get the logger in this builder.
virtual void listen_to(addresses::URI uri)=0
Add a URI to listen to.
virtual void add_method(std::unique_ptr< methods::IMethod > method)=0
Add a method.
IServerBuilderImpl() noexcept=default
Constructor.
virtual ~IServerBuilderImpl() noexcept=default
Destructor.
Definition of IAsyncExecutor class.
Definition of IBackend class.
Definition of IMethod class.
Definition of IServerImpl class.
Definition of Logger class.
Namespace of configurations.
Namespace of executors to process asynchronous tasks.
Namespace of internal implementation.
std::unique_ptr< IServerBuilderImpl > create_empty_server_builder_impl(std::shared_ptr< executors::IAsyncExecutor > executor, std::shared_ptr< logging::Logger > logger)
Create an empty IServerBuilderImpl object.
std::unique_ptr< IServerBuilderImpl > create_default_builder_impl(const config::ServerConfig &server_config, const std::shared_ptr< logging::Logger > &logger)
Create an IServerBuilderImpl object with default protocols.
Definition of ServerConfig class.