proxygen
proxygen::RejectConnectFilterFactory Class Reference

#include <RejectConnectFilter.h>

Inheritance diagram for proxygen::RejectConnectFilterFactory:
proxygen::RequestHandlerFactory

Public Member Functions

void onServerStart (folly::EventBase *) noexceptoverride
 
void onServerStop () noexceptoverride
 
RequestHandleronRequest (RequestHandler *h, HTTPMessage *msg) noexceptoverride
 
- Public Member Functions inherited from proxygen::RequestHandlerFactory
virtual ~RequestHandlerFactory ()
 

Detailed Description

Definition at line 81 of file RejectConnectFilter.h.

Member Function Documentation

RequestHandler* proxygen::RejectConnectFilterFactory::onRequest ( RequestHandler ,
HTTPMessage  
)
inlineoverridevirtualnoexcept

Invoked for each new request server handles. HTTPMessage is provided so that user can potentially choose among several implementation of handler based on URL or something. No need to save/copy this HTTPMessage. RequestHandler will be given the HTTPMessage in a separate callback.

Some request handlers don't handle the request themselves (think filters). They do take some actions based on request/response but otherwise they just hand-off request to some other RequestHandler. This upstream RequestHandler is given as first parameter. For the terminal RequestHandler this will by nullptr.

Implements proxygen::RequestHandlerFactory.

Definition at line 88 of file RejectConnectFilter.h.

References proxygen::CONNECT, h, and proxygen::RejectConnectFilter::RejectConnectFilter().

89  {
90 
91  if (msg->getMethod() == HTTPMethod::CONNECT) {
92  return new RejectConnectFilter(h);
93  }
94 
95  // No need to insert this filter
96  return h;
97  }
*than *hazptr_holder h
Definition: Hazptr.h:116
void proxygen::RejectConnectFilterFactory::onServerStart ( folly::EventBase evb)
inlineoverridevirtualnoexcept

Invoked in each thread server is going to handle requests before we start handling requests. Can be used to setup thread-local setup for each thread (stats and such).

Implements proxygen::RequestHandlerFactory.

Definition at line 83 of file RejectConnectFilter.h.

83 {}
void proxygen::RejectConnectFilterFactory::onServerStop ( )
inlineoverridevirtualnoexcept

Invoked in each handler thread after all the connections are drained from that thread. Can be used to tear down thread-local setup.

Implements proxygen::RequestHandlerFactory.

Definition at line 85 of file RejectConnectFilter.h.

85  {
86  }

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