proxygen
wangle::SerialServerDispatcher< Req, Resp > Class Template Reference

#include <ServerDispatcher.h>

Inheritance diagram for wangle::SerialServerDispatcher< Req, Resp >:
wangle::HandlerAdapter< Req, Resp > wangle::Handler< Req, Req, Resp, Resp > wangle::HandlerBase< HandlerContext< Req, Resp > >

Public Types

typedef HandlerAdapter< Req, Resp >::Context Context
 
- Public Types inherited from wangle::HandlerAdapter< Req, Resp >
typedef Handler< Req, Req, Resp, Resp >::Context Context
 
- Public Types inherited from wangle::Handler< Req, Req, Resp, Resp >
typedef Req rin
 
typedef Req rout
 
typedef Resp win
 
typedef Resp wout
 
typedef HandlerContext< Req, Resp > Context
 

Public Member Functions

 SerialServerDispatcher (Service< Req, Resp > *service)
 
void read (Context *ctx, Req in) override
 
- Public Member Functions inherited from wangle::HandlerAdapter< Req, Resp >
void read (Context *ctx, Reqmsg) override
 
folly::Future< folly::Unitwrite (Context *ctx, Respmsg) override
 
- Public Member Functions inherited from wangle::Handler< Req, Req, Resp, Resp >
 ~Handler () override=default
 
virtual void readEOF (Context *ctx)
 
virtual void readException (Context *ctx, folly::exception_wrapper e)
 
virtual void transportActive (Context *ctx)
 
virtual void transportInactive (Context *ctx)
 
virtual folly::Future< folly::UnitwriteException (Context *ctx, folly::exception_wrapper e)
 
virtual folly::Future< folly::Unitclose (Context *ctx)
 
- Public Member Functions inherited from wangle::HandlerBase< HandlerContext< Req, Resp > >
virtual ~HandlerBase ()=default
 
virtual void attachPipeline (HandlerContext< Req, Resp > *)
 
virtual void detachPipeline (HandlerContext< Req, Resp > *)
 
HandlerContext< Req, Resp > * getContext ()
 

Private Attributes

Service< Req, Resp > * service_
 

Additional Inherited Members

- Static Public Attributes inherited from wangle::Handler< Req, Req, Resp, Resp >
static const HandlerDir dir
 

Detailed Description

template<typename Req, typename Resp = Req>
class wangle::SerialServerDispatcher< Req, Resp >

Dispatch requests from pipeline one at a time synchronously. Concurrent requests are queued in the pipeline.

Definition at line 29 of file ServerDispatcher.h.

Member Typedef Documentation

template<typename Req , typename Resp = Req>
typedef HandlerAdapter<Req, Resp>::Context wangle::SerialServerDispatcher< Req, Resp >::Context

Definition at line 32 of file ServerDispatcher.h.

Constructor & Destructor Documentation

template<typename Req , typename Resp = Req>
wangle::SerialServerDispatcher< Req, Resp >::SerialServerDispatcher ( Service< Req, Resp > *  service)
inlineexplicit

Definition at line 34 of file ServerDispatcher.h.

35  : service_(service) {}
Service< Req, Resp > * service_

Member Function Documentation

template<typename Req , typename Resp = Req>
void wangle::SerialServerDispatcher< Req, Resp >::read ( Context ctx,
Req  in 
)
inlineoverride

Definition at line 37 of file ServerDispatcher.h.

References folly::gen::move.

37  {
38  auto resp = (*service_)(std::move(in)).get();
39  ctx->fireWrite(std::move(resp));
40  }
constexpr detail::Map< Move > move
Definition: Base-inl.h:2567

Member Data Documentation

template<typename Req , typename Resp = Req>
Service<Req, Resp>* wangle::SerialServerDispatcher< Req, Resp >::service_
private

Definition at line 44 of file ServerDispatcher.h.


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