#include <DBHandler.h>
|
| TrackingProcessor (std::shared_ptr< HeavyIf > handler, const bool check_origin) |
|
bool | process (std::shared_ptr<::apache::thrift::protocol::TProtocol > in, std::shared_ptr<::apache::thrift::protocol::TProtocol > out, void *connectionContext) override |
|
Definition at line 114 of file DBHandler.h.
TrackingProcessor::TrackingProcessor |
( |
std::shared_ptr< HeavyIf > |
handler, |
|
|
const bool |
check_origin |
|
) |
| |
|
inline |
bool TrackingProcessor::process |
( |
std::shared_ptr<::apache::thrift::protocol::TProtocol > |
in, |
|
|
std::shared_ptr<::apache::thrift::protocol::TProtocol > |
out, |
|
|
void * |
connectionContext |
|
) |
| |
|
inlineoverride |
Definition at line 119 of file DBHandler.h.
References client_address, client_protocol, HTTP, Other, split(), and TCP.
122 using namespace ::apache::thrift;
124 auto transport = in->getTransport();
126 static std::mutex processor_mutex;
128 const auto origin_str = transport->getOrigin();
129 std::vector<std::string> origins;
130 boost::split(origins, origin_str, boost::is_any_of(
","));
131 if (origins.empty()) {
136 auto trimmed_origin = origins.front();
137 boost::algorithm::trim(trimmed_origin);
140 if (dynamic_cast<transport::THttpTransport*>(transport.get())) {
142 }
else if (dynamic_cast<transport::TBufferedTransport*>(transport.get())) {
151 return HeavyProcessor::process(in, out, connectionContext);
std::lock_guard< T > lock_guard
static thread_local std::string client_address
static thread_local ClientProtocol client_protocol
const bool TrackingProcessor::check_origin_ |
|
private |
thread_local std::string TrackingProcessor::client_address |
|
static |
The documentation for this class was generated from the following files:
- /home/jenkins-slave/workspace/core-os-doxygen/ThriftHandler/DBHandler.h
- /home/jenkins-slave/workspace/core-os-doxygen/ThriftHandler/DBHandler.cpp