proxygen
wangle::MockBytesToBytesHandler Class Reference

#include <MockHandler.h>

Inheritance diagram for wangle::MockBytesToBytesHandler:
wangle::HandlerAdapter< R, W > wangle::Handler< R, R, W, W > wangle::HandlerBase< HandlerContext< R, W > >

Public Member Functions

folly::MoveWrapper< folly::Future< folly::Unit > > defaultFuture ()
 
 MOCK_METHOD1 (transportActive, void(Context *))
 
 MOCK_METHOD1 (transportInactive, void(Context *))
 
 MOCK_METHOD2 (read, void(Context *, folly::IOBufQueue &))
 
 MOCK_METHOD1 (readEOF, void(Context *))
 
 MOCK_METHOD2 (readException, void(Context *, folly::exception_wrapper))
 
 MOCK_METHOD2 (write, folly::MoveWrapper< folly::Future< folly::Unit >>(Context *, std::shared_ptr< folly::IOBuf >))
 
 MOCK_METHOD1 (mockClose, folly::MoveWrapper< folly::Future< folly::Unit >>(Context *))
 
 MOCK_METHOD2 (mockWriteException, folly::MoveWrapper< folly::Future< folly::Unit >>(Context *, folly::exception_wrapper))
 
folly::Future< folly::Unitwrite (Context *ctx, std::unique_ptr< folly::IOBuf > buf) override
 
folly::Future< folly::Unitclose (Context *ctx) override
 
folly::Future< folly::UnitwriteException (Context *ctx, folly::exception_wrapper ex) override
 
- Public Member Functions inherited from wangle::HandlerAdapter< R, W >
void read (Context *ctx, R msg) override
 
folly::Future< folly::Unitwrite (Context *ctx, W msg) override
 
- Public Member Functions inherited from wangle::Handler< R, R, W, W >
 ~Handler () override=default
 
virtual void read (Context *ctx, Rmsg)=0
 
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::Unitwrite (Context *ctx, Wmsg)=0
 
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< R, W > >
virtual ~HandlerBase ()=default
 
virtual void attachPipeline (HandlerContext< R, W > *)
 
virtual void detachPipeline (HandlerContext< R, W > *)
 
HandlerContext< R, W > * getContext ()
 

Additional Inherited Members

- Public Types inherited from wangle::HandlerAdapter< R, W >
typedef Handler< R, R, W, W >::Context Context
 
- Public Types inherited from wangle::Handler< R, R, W, W >
typedef R rin
 
typedef R rout
 
typedef W win
 
typedef W wout
 
typedef HandlerContext< R, W > Context
 
- Static Public Attributes inherited from wangle::Handler< R, R, W, W >
static const HandlerDir dir
 

Detailed Description

Definition at line 73 of file MockHandler.h.

Member Function Documentation

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

Definition at line 100 of file MockHandler.h.

100  {
101  return mockClose(ctx).move();
102  }
wangle::MockBytesToBytesHandler::MOCK_METHOD1 ( transportActive  ,
void(Context *)   
)
wangle::MockBytesToBytesHandler::MOCK_METHOD1 ( transportInactive  ,
void(Context *)   
)
wangle::MockBytesToBytesHandler::MOCK_METHOD1 ( readEOF  ,
void(Context *)   
)
wangle::MockBytesToBytesHandler::MOCK_METHOD1 ( mockClose  ,
folly::MoveWrapper< folly::Future< folly::Unit >>  Context * 
)
wangle::MockBytesToBytesHandler::MOCK_METHOD2 ( read  ,
void(Context *, folly::IOBufQueue &)   
)
wangle::MockBytesToBytesHandler::MOCK_METHOD2 ( readException  ,
void(Context *, folly::exception_wrapper  
)
wangle::MockBytesToBytesHandler::MOCK_METHOD2 ( write  ,
folly::MoveWrapper< folly::Future< folly::Unit >>  Context *, std::shared_ptr< folly::IOBuf > 
)
wangle::MockBytesToBytesHandler::MOCK_METHOD2 ( mockWriteException  ,
folly::MoveWrapper< folly::Future< folly::Unit >>  Context *, folly::exception_wrapper 
)
folly::Future<folly::Unit> wangle::MockBytesToBytesHandler::write ( Context ctx,
std::unique_ptr< folly::IOBuf buf 
)
inlineoverride

Definition at line 94 of file MockHandler.h.

References wangle::MockHandler< Rin, Rout, Win, Wout >::write().

95  {
96  std::shared_ptr<folly::IOBuf> sbuf(buf.release());
97  return write(ctx, sbuf).move();
98  }
folly::Future< folly::Unit > write(Context *ctx, std::unique_ptr< folly::IOBuf > buf) override
Definition: MockHandler.h:94
folly::Future<folly::Unit> wangle::MockBytesToBytesHandler::writeException ( Context ctx,
folly::exception_wrapper  ex 
)
inlineoverride

Definition at line 104 of file MockHandler.h.

105  {
106  return mockWriteException(ctx, ex).move();
107  }

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