proxygen
proxygen::RequestHandlerChain Class Reference

#include <RequestHandlerFactory.h>

Public Member Functions

std::vector< std::unique_ptr< RequestHandlerFactory > > build ()
 
template<typename T , typename... Args>
RequestHandlerChainaddThen (Args &&...args)
 
RequestHandlerChainaddThen (std::unique_ptr< RequestHandlerFactory > h)
 

Private Attributes

std::vector< std::unique_ptr< RequestHandlerFactory > > chain_
 

Detailed Description

Helper class to help beautify the way we make chains of these filters

Definition at line 55 of file RequestHandlerFactory.h.

Member Function Documentation

template<typename T , typename... Args>
RequestHandlerChain& proxygen::RequestHandlerChain::addThen ( Args &&...  args)
inline

Definition at line 62 of file RequestHandlerFactory.h.

Referenced by ScopedServerTest::createDefaultOpts(), ConnectionFilterTest::createDefaultOpts(), main(), setupServer(), and TEST().

62  {
63  chain_.push_back(std::make_unique<T>(std::forward<Args>(args)...));
64  return *this;
65  }
std::vector< std::unique_ptr< RequestHandlerFactory > > chain_
RequestHandlerChain& proxygen::RequestHandlerChain::addThen ( std::unique_ptr< RequestHandlerFactory h)
inline

Definition at line 67 of file RequestHandlerFactory.h.

References folly::gen::move.

67  {
68  chain_.push_back(std::move(h));
69  return *this;
70  }
constexpr detail::Map< Move > move
Definition: Base-inl.h:2567
std::vector< std::unique_ptr< RequestHandlerFactory > > chain_
std::vector<std::unique_ptr<RequestHandlerFactory> > proxygen::RequestHandlerChain::build ( )
inline

Definition at line 57 of file RequestHandlerFactory.h.

References testing::Args(), folly::gen::move, and T.

57  {
58  return std::move(chain_);
59  }
constexpr detail::Map< Move > move
Definition: Base-inl.h:2567
std::vector< std::unique_ptr< RequestHandlerFactory > > chain_

Member Data Documentation

std::vector<std::unique_ptr<RequestHandlerFactory> > proxygen::RequestHandlerChain::chain_
private

Definition at line 73 of file RequestHandlerFactory.h.


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