proxygen
wangle::MockBroadcastPipelineFactory Class Reference

#include <Mocks.h>

Inheritance diagram for wangle::MockBroadcastPipelineFactory:
wangle::BroadcastPipelineFactory< int, std::string > wangle::PipelineFactory< DefaultPipeline >

Public Member Functions

DefaultPipeline::Ptr newPipeline (std::shared_ptr< folly::AsyncTransportWrapper > socket) override
 
BroadcastHandler< int, std::string > * getBroadcastHandler (DefaultPipeline *pipeline) noexceptoverride
 
 MOCK_METHOD2 (setRoutingData, void(DefaultPipeline *, const std::string &))
 
- Public Member Functions inherited from wangle::BroadcastPipelineFactory< int, std::string >
virtual void setRoutingData (DefaultPipeline *pipeline, const std::string &routingData)=0
 
- Public Member Functions inherited from wangle::PipelineFactory< DefaultPipeline >
virtual DefaultPipeline::Ptr newPipeline (std::shared_ptr< folly::AsyncUDPSocket >, const folly::SocketAddress &)
 
virtual ~PipelineFactory ()=default
 

Detailed Description

Definition at line 125 of file Mocks.h.

Member Function Documentation

BroadcastHandler<int, std::string>* wangle::MockBroadcastPipelineFactory::getBroadcastHandler ( DefaultPipeline pipeline)
inlineoverridevirtualnoexcept

Implements wangle::BroadcastPipelineFactory< int, std::string >.

Definition at line 139 of file Mocks.h.

References MOCK_METHOD2, and string.

140  {
141  return pipeline->getHandler<BroadcastHandler<int, std::string>>(2);
142  }
wangle::MockBroadcastPipelineFactory::MOCK_METHOD2 ( setRoutingData  ,
void(DefaultPipeline *, const std::string &)   
)
DefaultPipeline::Ptr wangle::MockBroadcastPipelineFactory::newPipeline ( std::shared_ptr< folly::AsyncTransportWrapper socket)
inlineoverridevirtual

Implements wangle::BroadcastPipelineFactory< int, std::string >.

Definition at line 128 of file Mocks.h.

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

129  {
130  auto pipeline = DefaultPipeline::create();
131  pipeline->addBack(AsyncSocketHandler(socket));
132  pipeline->addBack(std::make_shared<MockByteToMessageDecoder<int>>());
133  pipeline->addBack(BroadcastHandler<int, std::string>());
134  pipeline->finalize();
135 
136  return pipeline;
137  }
NetworkSocket socket(int af, int type, int protocol)
Definition: NetOps.cpp:412
static Ptr create()
Definition: Pipeline.h:174

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