proxygen
RpcPipelineFactory Class Reference
Inheritance diagram for RpcPipelineFactory:
wangle::PipelineFactory< SerializePipeline > wangle::PipelineFactory< SerializePipeline >

Public Member Functions

SerializePipeline::Ptr newPipeline (std::shared_ptr< AsyncTransportWrapper > sock) override
 
SerializePipeline::Ptr newPipeline (std::shared_ptr< AsyncTransportWrapper > sock) override
 
- Public Member Functions inherited from wangle::PipelineFactory< SerializePipeline >
virtual SerializePipeline::Ptr newPipeline (std::shared_ptr< folly::AsyncUDPSocket >, const folly::SocketAddress &)
 
virtual ~PipelineFactory ()=default
 

Private Attributes

ExecutorFilter< Bonk, Xtruct > service_
 

Detailed Description

Definition at line 42 of file RpcClient.cpp.

Member Function Documentation

SerializePipeline::Ptr RpcPipelineFactory::newPipeline ( std::shared_ptr< AsyncTransportWrapper sock)
inlineoverridevirtual

Implements wangle::PipelineFactory< SerializePipeline >.

Definition at line 44 of file RpcClient.cpp.

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

45  {
46  auto pipeline = SerializePipeline::create();
47  pipeline->addBack(AsyncSocketHandler(sock));
48  // ensure we can write from any thread
49  pipeline->addBack(EventBaseHandler());
50  pipeline->addBack(LengthFieldBasedFrameDecoder());
51  pipeline->addBack(LengthFieldPrepender());
52  pipeline->addBack(ClientSerializeHandler());
53  pipeline->finalize();
54 
55  return pipeline;
56  }
static Ptr create()
Definition: Pipeline.h:174
SerializePipeline::Ptr RpcPipelineFactory::newPipeline ( std::shared_ptr< AsyncTransportWrapper sock)
inlineoverridevirtual

Implements wangle::PipelineFactory< SerializePipeline >.

Definition at line 64 of file RpcServer.cpp.

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

65  {
66  auto pipeline = SerializePipeline::create();
67  pipeline->addBack(AsyncSocketHandler(sock));
68  // ensure we can write from any thread
69  pipeline->addBack(EventBaseHandler());
70  pipeline->addBack(LengthFieldBasedFrameDecoder());
71  pipeline->addBack(LengthFieldPrepender());
72  pipeline->addBack(ServerSerializeHandler());
73  // We could use a serial dispatcher instead easily
74  // pipeline->addBack(SerialServerDispatcher<Bonk>(&service_));
75  // Or a Pipelined Dispatcher
76  // pipeline->addBack(PipelinedServerDispatcher<Bonk>(&service_));
78  pipeline->finalize();
79 
80  return pipeline;
81  }
ExecutorFilter< Bonk, Xtruct > service_
Definition: RpcServer.cpp:84
static Ptr create()
Definition: Pipeline.h:174

Member Data Documentation

ExecutorFilter<Bonk, Xtruct> RpcPipelineFactory::service_
private
Initial value:
{
std::make_shared<CPUThreadPoolExecutor>(10),
std::make_shared<RpcService>()}

Definition at line 84 of file RpcServer.cpp.


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