#include <swcdb/fsbroker/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 |
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 43 of file AppContext.h.
typedef std::shared_ptr<AppContext> SWC::FsBroker::AppContext::Ptr |
Definition at line 99 of file AppContext.h.
|
inline |
Definition at line 101 of file AppContext.h.
References SWC::FS::BROKER, SWC::FS::fs_type(), SWC::Env::FsBroker::init(), SWC::Env::Clients::init(), SWC::Env::FsInterface::init(), SWC::Env::IoCtx::init(), SWC::Env::IoCtx::io(), SWC::client::Clients::make(), SWC::Env::Config::settings(), and SWC_ASSERT.
|
inlinevirtualnoexcept |
Reimplemented from SWC::Comm::AppContext.
Definition at line 165 of file AppContext.h.
|
inlineoverridevirtual |
Implements SWC::Comm::AppContext.
Definition at line 179 of file AppContext.h.
References SWC::Env::FsBroker::can_process(), SWC::Env::FsBroker::in_process(), m_metrics, SWC::Comm::Protocol::FsBroker::MAX_CMD, SWC::Comm::Protocol::Common::Handler::not_implemented(), and SWC::Env::IoCtx::post().
|
inlineoverridevirtualnoexcept |
Implements SWC::Comm::AppContext.
Definition at line 173 of file AppContext.h.
|
inlineoverridevirtual |
Implements SWC::Comm::AppContext.
Definition at line 167 of file AppContext.h.
|
inlineoverridevirtual |
Reimplemented from SWC::Comm::AppContext.
Definition at line 149 of file AppContext.h.
References SWC::Env::IoCtx::io(), m_metrics, SWC::Env::FsBroker::metrics_track(), and shutting_down().
|
inlineoverridevirtualnoexcept |
Reimplemented from SWC::Comm::AppContext.
Definition at line 214 of file AppContext.h.
References m_metrics.
|
inlineoverridevirtualnoexcept |
Reimplemented from SWC::Comm::AppContext.
Definition at line 208 of file AppContext.h.
References m_metrics.
|
inlineoverridevirtualnoexcept |
Reimplemented from SWC::Comm::AppContext.
Definition at line 202 of file AppContext.h.
References m_metrics.
|
inline |
Definition at line 161 of file AppContext.h.
References m_srv.
|
inline |
Definition at line 220 of file AppContext.h.
References SWC::Env::IoCtx::io(), SWC::LOG_INFO, shutting_down(), SWC_CAN_INLINE, and SWC_LOGF.
Referenced by init(), and shutting_down().
|
inlineoverridevirtual |
Reimplemented from SWC::Comm::AppContext.
Definition at line 247 of file AppContext.h.
References SWC::Env::Clients::get(), SWC::Env::FsInterface::interface(), SWC::Env::IoCtx::io(), m_metrics, m_srv, SWC::Env::IoCtx::reset(), SWC::Env::Clients::reset(), SWC::Env::FsInterface::reset(), SWC::Env::FsBroker::reset(), and SWC::Env::FsBroker::shuttingdown().
|
private |
Definition at line 280 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 279 of file AppContext.h.
Referenced by handle_disconnect(), handle_established(), set_srv(), and stop().