#include <swcdb/broker/AppContext.h>
Classes | |
struct | CommandHandler |
Public Types | |
typedef std::shared_ptr< AppContext > | Ptr |
Public Types inherited from SWC::Comm::AppContext | |
typedef std::shared_ptr< AppContext > | Ptr |
Public Member Functions | |
AppContext () | |
void | init (const std::string &host, const Comm::EndPoints &endpoints) override |
void | set_srv (Comm::server::SerializedServer::Ptr srv) |
virtual | ~AppContext () noexcept |
void | handle_established (Comm::ConnHandlerPtr conn) override |
void | handle_disconnect (Comm::ConnHandlerPtr conn) noexcept override |
void | handle (Comm::ConnHandlerPtr conn, const Comm::Event::Ptr &ev) override |
void | net_bytes_sent (const Comm::ConnHandlerPtr &conn, size_t b) noexcept override |
void | net_bytes_received (const Comm::ConnHandlerPtr &conn, size_t b) noexcept override |
void | net_accepted (const Comm::EndPoint &endpoint, bool secure) noexcept override |
void | shutting_down (const std::error_code &ec, const int &sig) |
void | stop () override |
Public Member Functions inherited from SWC::Comm::AppContext | |
SWC_CAN_INLINE | AppContext (Config::Property::Value_enum_g::Ptr a_cfg_encoder) noexcept |
AppContext (AppContext &&)=delete | |
AppContext (const AppContext &)=delete | |
AppContext & | operator= (AppContext &&)=delete |
AppContext & | operator= (const AppContext &)=delete |
Static Public Member Functions | |
static Ptr | make () |
Private Attributes | |
Comm::server::SerializedServer::Ptr | m_srv = nullptr |
Metric::Reporting::Ptr | m_metrics = nullptr |
Additional Inherited Members | |
Public Attributes inherited from SWC::Comm::AppContext | |
const Config::Property::Value_enum_g::Ptr | cfg_encoder |
Definition at line 31 of file AppContext.h.
typedef std::shared_ptr<AppContext> SWC::Broker::AppContext::Ptr |
Definition at line 70 of file AppContext.h.
|
inline |
Definition at line 109 of file AppContext.h.
Referenced by make().
|
inlinevirtualnoexcept |
Reimplemented from SWC::Comm::AppContext.
Definition at line 135 of file AppContext.h.
|
inlineoverridevirtual |
Implements SWC::Comm::AppContext.
Definition at line 149 of file AppContext.h.
References SWC::Env::Bkr::can_process(), m_metrics, SWC::Comm::Protocol::Bkr::MAX_CMD, SWC::Comm::Protocol::Common::Handler::not_implemented(), SWC::Env::Bkr::post(), and SWC::Env::Bkr::processed().
|
inlineoverridevirtualnoexcept |
Implements SWC::Comm::AppContext.
Definition at line 143 of file AppContext.h.
|
inlineoverridevirtual |
Implements SWC::Comm::AppContext.
Definition at line 137 of file AppContext.h.
|
inlineoverridevirtual |
Reimplemented from SWC::Comm::AppContext.
Definition at line 116 of file AppContext.h.
References SWC::Env::Bkr::io(), m_metrics, shutting_down(), and SWC::Env::Bkr::start().
|
inlinestatic |
Definition at line 72 of file AppContext.h.
References AppContext(), SWC::Env::Bkr::init(), SWC::Env::Clients::init(), SWC::Env::Bkr::io(), SWC::client::Clients::make(), SWC::Comm::IoContext::make(), and SWC::Env::Config::settings().
Referenced by SWC::Broker::make_service().
|
inlineoverridevirtualnoexcept |
Reimplemented from SWC::Comm::AppContext.
Definition at line 185 of file AppContext.h.
References m_metrics.
|
inlineoverridevirtualnoexcept |
Reimplemented from SWC::Comm::AppContext.
Definition at line 179 of file AppContext.h.
References m_metrics.
|
inlineoverridevirtualnoexcept |
Reimplemented from SWC::Comm::AppContext.
Definition at line 173 of file AppContext.h.
References m_metrics.
|
inline |
Definition at line 131 of file AppContext.h.
References m_srv.
|
inline |
Definition at line 191 of file AppContext.h.
References SWC::Env::Bkr::io(), SWC::LOG_INFO, m_srv, shutting_down(), SWC_CAN_INLINE, SWC_LOG, SWC_LOGF, and SWC_QUICK_EXIT.
Referenced by init(), and shutting_down().
|
inlineoverridevirtual |
Reimplemented from SWC::Comm::AppContext.
Definition at line 224 of file AppContext.h.
References SWC::Env::Clients::get(), SWC::Env::Bkr::io(), m_metrics, m_srv, SWC::Env::Bkr::reset(), SWC::Env::Clients::reset(), and SWC::Env::Bkr::shuttingdown().
|
private |
Definition at line 254 of file AppContext.h.
Referenced by handle(), handle_disconnect(), handle_established(), init(), net_accepted(), net_bytes_received(), net_bytes_sent(), and stop().
|
private |
Definition at line 253 of file AppContext.h.
Referenced by handle_disconnect(), handle_established(), set_srv(), shutting_down(), and stop().