proxygen
proxygen::HandlerCallbacks Class Reference
Inheritance diagram for proxygen::HandlerCallbacks:

Public Member Functions

 HandlerCallbacks (std::shared_ptr< HTTPServerOptions > options)
 
void threadStarted (ThreadPoolExecutor::ThreadHandle *h) override
 
void threadStopped (ThreadPoolExecutor::ThreadHandle *h) override
 

Private Attributes

std::shared_ptr< HTTPServerOptionsoptions_
 

Detailed Description

Definition at line 93 of file HTTPServer.cpp.

Constructor & Destructor Documentation

proxygen::HandlerCallbacks::HandlerCallbacks ( std::shared_ptr< HTTPServerOptions options)
inlineexplicit

Definition at line 95 of file HTTPServer.cpp.

95 : options_(options) {}
std::shared_ptr< HTTPServerOptions > options_
Definition: HTTPServer.cpp:115

Member Function Documentation

void proxygen::HandlerCallbacks::threadStarted ( ThreadPoolExecutor::ThreadHandle *  h)
inlineoverride

Definition at line 97 of file HTTPServer.cpp.

References folly::getEventBase(), and proxygen::HTTPServer::options_.

97  {
99  CHECK(evb) << "Invariant violated - started thread must have an EventBase";
100  evb->runInEventBaseThread([=](){
101  for (auto& factory: options_->handlerFactories) {
102  factory->onServerStart(evb);
103  }
104  });
105  }
*than *hazptr_holder h
Definition: Hazptr.h:116
EventBase * getEventBase()
std::shared_ptr< HTTPServerOptions > options_
Definition: HTTPServer.cpp:115
void proxygen::HandlerCallbacks::threadStopped ( ThreadPoolExecutor::ThreadHandle *  h)
inlineoverride

Definition at line 106 of file HTTPServer.cpp.

References folly::getEventBase(), proxygen::HTTPServer::options_, and folly::EventBase::runInEventBaseThread().

106  {
108  for (auto& factory: options_->handlerFactories) {
109  factory->onServerStop();
110  }
111  });
112  }
*than *hazptr_holder h
Definition: Hazptr.h:116
EventBase * getEventBase()
std::shared_ptr< HTTPServerOptions > options_
Definition: HTTPServer.cpp:115
bool runInEventBaseThread(void(*fn)(T *), T *arg)
Definition: EventBase.h:794

Member Data Documentation

std::shared_ptr<HTTPServerOptions> proxygen::HandlerCallbacks::options_
private

Definition at line 115 of file HTTPServer.cpp.


The documentation for this class was generated from the following file: