#include <DBHandler.h>
|
| TrackingProcessor (mapd::shared_ptr< OmniSciIf > handler, const bool check_origin) |
|
bool | process (mapd::shared_ptr<::apache::thrift::protocol::TProtocol > in, mapd::shared_ptr<::apache::thrift::protocol::TProtocol > out, void *connectionContext) |
|
Definition at line 108 of file DBHandler.h.
TrackingProcessor::TrackingProcessor |
( |
mapd::shared_ptr< OmniSciIf > |
handler, |
|
|
const bool |
check_origin |
|
) |
| |
|
inline |
bool TrackingProcessor::process |
( |
mapd::shared_ptr<::apache::thrift::protocol::TProtocol > |
in, |
|
|
mapd::shared_ptr<::apache::thrift::protocol::TProtocol > |
out, |
|
|
void * |
connectionContext |
|
) |
| |
|
inline |
Definition at line 113 of file DBHandler.h.
References client_address, client_protocol, HTTP, Other, split(), and TCP.
116 using namespace ::apache::thrift;
118 auto transport = in->getTransport();
120 static std::mutex processor_mutex;
121 std::lock_guard lock(processor_mutex);
122 const auto origin_str = transport->getOrigin();
123 std::vector<std::string> origins;
124 boost::split(origins, origin_str, boost::is_any_of(
","));
125 if (origins.empty()) {
130 auto trimmed_origin = origins.front();
131 boost::algorithm::trim(trimmed_origin);
134 if (dynamic_cast<transport::THttpTransport*>(transport.get())) {
136 }
else if (dynamic_cast<transport::TBufferedTransport*>(transport.get())) {
145 return OmniSciProcessor::process(in, out, connectionContext);
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