Clio develop
The XRP Ledger API server.
Loading...
Searching...
No Matches
ClioApplication.hpp
1//------------------------------------------------------------------------------
2/*
3 This file is part of clio: https://github.com/XRPLF/clio
4 Copyright (c) 2024, the clio developers.
5
6 Permission to use, copy, modify, and distribute this software for any
7 purpose with or without fee is hereby granted, provided that the above
8 copyright notice and this permission notice appear in all copies.
9
10 THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
11 WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
12 MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
13 ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
14 WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
15 ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
16 OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
17*/
18//==============================================================================
19
20#pragma once
21
22#include "app/Stopper.hpp"
23#include "util/SignalsHandler.hpp"
24#include "util/newconfig/ConfigDefinition.hpp"
25
26namespace app {
27
33 util::SignalsHandler signalsHandler_;
34 Stopper appStopper_;
35
36public:
43
51 int
52 run(bool useNgWebServer);
53};
54
55} // namespace app
The main application class.
Definition ClioApplication.hpp:31
ClioApplication(util::config::ClioConfigDefinition const &config)
Construct a new ClioApplication object.
Definition ClioApplication.cpp:83
int run(bool useNgWebServer)
Run the application.
Definition ClioApplication.cpp:92
Application stopper class. On stop it will create a new thread to run all the shutdown tasks.
Definition Stopper.hpp:42
Class handling signals.
Definition SignalsHandler.hpp:49
All the config data will be stored and extracted from this class.
Definition ConfigDefinition.hpp:54