proxygen
wangle::MockObservingHandler Class Reference

#include <Mocks.h>

Inheritance diagram for wangle::MockObservingHandler:
wangle::ObservingHandler< int, std::string > wangle::HandlerAdapter< folly::IOBufQueue &, int > wangle::Subscriber< int, std::string > wangle::Handler< folly::IOBufQueue &, folly::IOBufQueue &, int, int > wangle::HandlerBase< HandlerContext< folly::IOBufQueue &, int > >

Public Member Functions

 MockObservingHandler (BroadcastPool< int, std::string > *broadcastPool)
 
 MOCK_METHOD2 (mockWrite, folly::MoveWrapper< folly::Future< folly::Unit >>(Context *, int))
 
 MOCK_METHOD1 (mockClose, folly::MoveWrapper< folly::Future< folly::Unit >>(Context *))
 
folly::Future< folly::Unitwrite (Context *ctx, int data) override
 
folly::Future< folly::Unitclose (Context *ctx) override
 
- Public Member Functions inherited from wangle::ObservingHandler< int, std::string >
 ObservingHandler (const std::string &routingData, BroadcastPool< int, std::string, DefaultPipeline > *broadcastPool)
 
 ObservingHandler (const ObservingHandler &)=delete
 
 ObservingHandler (ObservingHandler &&)=default
 
 ~ObservingHandler () override
 
ObservingHandleroperator= (const ObservingHandler &)=delete
 
ObservingHandleroperator= (ObservingHandler &&)=default
 
void transportActive (Context *ctx) override
 
void readEOF (Context *ctx) override
 
void readException (Context *ctx, folly::exception_wrapper ex) override
 
void onNext (const int &buf) override
 
void onError (folly::exception_wrapper ex) override
 
void onCompleted () override
 
std::stringroutingData () override
 
- Public Member Functions inherited from wangle::HandlerAdapter< folly::IOBufQueue &, int >
void read (Context *ctx, folly::IOBufQueue &msg) override
 
folly::Future< folly::Unitwrite (Context *ctx, intmsg) override
 
- Public Member Functions inherited from wangle::Handler< folly::IOBufQueue &, folly::IOBufQueue &, int, int >
 ~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< folly::IOBufQueue &, int > >
virtual ~HandlerBase ()=default
 
virtual void attachPipeline (HandlerContext< folly::IOBufQueue &, int > *)
 
virtual void detachPipeline (HandlerContext< folly::IOBufQueue &, int > *)
 
HandlerContext< folly::IOBufQueue &, int > * getContext ()
 
- Public Member Functions inherited from wangle::Subscriber< int, std::string >
virtual ~Subscriber ()
 

Additional Inherited Members

- Public Types inherited from wangle::ObservingHandler< int, std::string >
typedef HandlerAdapter< folly::IOBufQueue &, int >::Context Context
 
- Public Types inherited from wangle::HandlerAdapter< folly::IOBufQueue &, int >
typedef Handler< folly::IOBufQueue &, folly::IOBufQueue &, int, int >::Context Context
 
- Public Types inherited from wangle::Handler< folly::IOBufQueue &, folly::IOBufQueue &, int, int >
typedef folly::IOBufQueuerin
 
typedef folly::IOBufQueuerout
 
typedef int win
 
typedef int wout
 
typedef HandlerContext< folly::IOBufQueue &, int > Context
 
- Static Public Attributes inherited from wangle::Handler< folly::IOBufQueue &, folly::IOBufQueue &, int, int >
static const HandlerDir dir
 

Detailed Description

Definition at line 100 of file Mocks.h.

Constructor & Destructor Documentation

wangle::MockObservingHandler::MockObservingHandler ( BroadcastPool< int, std::string > *  broadcastPool)
inlineexplicit

Definition at line 102 of file Mocks.h.

References wangle::MockSubscriber< T, R >::MOCK_METHOD1(), and MOCK_METHOD2.

103  : ObservingHandler<int, std::string>("", broadcastPool) {}

Member Function Documentation

folly::Future<folly::Unit> wangle::MockObservingHandler::close ( Context ctx)
inlineoverride

Definition at line 114 of file Mocks.h.

114  {
115  return mockClose(ctx).move();
116  }
wangle::MockObservingHandler::MOCK_METHOD1 ( mockClose  ,
folly::MoveWrapper< folly::Future< folly::Unit >>  Context * 
)
wangle::MockObservingHandler::MOCK_METHOD2 ( mockWrite  ,
folly::MoveWrapper< folly::Future< folly::Unit >>  Context *, int 
)
folly::Future<folly::Unit> wangle::MockObservingHandler::write ( Context ctx,
int  data 
)
inlineoverride

Definition at line 110 of file Mocks.h.

110  {
111  return mockWrite(ctx, data).move();
112  }
static constexpr uint64_t data[1]
Definition: Fingerprint.cpp:43

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