proxygen
wangle::MockDownstreamPipelineFactory Class Reference

#include <Mocks.h>

Inheritance diagram for wangle::MockDownstreamPipelineFactory:
wangle::RoutingDataPipelineFactory< DefaultPipeline, char >

Public Member Functions

 MockDownstreamPipelineFactory (MockBytesToBytesHandler *downstreamHandler)
 
DefaultPipeline::Ptr newPipeline (std::shared_ptr< folly::AsyncTransportWrapper > socket, const char &, RoutingDataHandler< char > *, std::shared_ptr< TransportInfo >) override
 
- Public Member Functions inherited from wangle::RoutingDataPipelineFactory< DefaultPipeline, char >
virtual ~RoutingDataPipelineFactory ()
 

Protected Attributes

MockBytesToBytesHandlerdownstreamHandler_
 

Detailed Description

Definition at line 107 of file Mocks.h.

Constructor & Destructor Documentation

wangle::MockDownstreamPipelineFactory::MockDownstreamPipelineFactory ( MockBytesToBytesHandler downstreamHandler)
inlineexplicit

Definition at line 110 of file Mocks.h.

112  : downstreamHandler_(downstreamHandler) {}
MockBytesToBytesHandler * downstreamHandler_
Definition: Mocks.h:127

Member Function Documentation

DefaultPipeline::Ptr wangle::MockDownstreamPipelineFactory::newPipeline ( std::shared_ptr< folly::AsyncTransportWrapper socket,
const char &  ,
RoutingDataHandler< char > *  ,
std::shared_ptr< TransportInfo  
)
inlineoverridevirtual

Implements wangle::RoutingDataPipelineFactory< DefaultPipeline, char >.

Definition at line 113 of file Mocks.h.

References wangle::Pipeline< R, W >::create().

117  {
118  auto pipeline = DefaultPipeline::create();
119  pipeline->addBack(AsyncSocketHandler(socket));
120  pipeline->addBack(
121  std::shared_ptr<MockBytesToBytesHandler>(downstreamHandler_));
122  pipeline->finalize();
123  return pipeline;
124  }
MockBytesToBytesHandler * downstreamHandler_
Definition: Mocks.h:127
NetworkSocket socket(int af, int type, int protocol)
Definition: NetOps.cpp:412
static Ptr create()
Definition: Pipeline.h:174

Member Data Documentation

MockBytesToBytesHandler* wangle::MockDownstreamPipelineFactory::downstreamHandler_
protected

Definition at line 127 of file Mocks.h.


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