proxygen
proxygen::MockResponseHandler Class Reference

#include <Mocks.h>

Inheritance diagram for proxygen::MockResponseHandler:
proxygen::ResponseHandler

Public Member Functions

 MockResponseHandler (RequestHandler *h)
 
 GMOCK_METHOD1_ (, noexcept,, sendHeaders, void(HTTPMessage &))
 
 GMOCK_METHOD1_ (, noexcept,, sendChunkHeader, void(size_t))
 
 GMOCK_METHOD1_ (, noexcept,, sendBody, void(std::shared_ptr< folly::IOBuf >))
 
 GMOCK_METHOD0_ (, noexcept,, sendChunkTerminator, void())
 
 GMOCK_METHOD0_ (, noexcept,, sendEOM, void())
 
 GMOCK_METHOD0_ (, noexcept,, sendAbort, void())
 
 GMOCK_METHOD0_ (, noexcept,, refreshTimeout, void())
 
 GMOCK_METHOD0_ (, noexcept,, pauseIngress, void())
 
 GMOCK_METHOD0_ (, noexcept,, resumeIngress, void())
 
 GMOCK_METHOD1_ (, noexcept,, newPushedResponse, ResponseHandler *(PushHandler *))
 
 MOCK_CONST_METHOD1 (getCurrentTransportInfo, void(wangle::TransportInfo *))
 
const wangle::TransportInfogetSetupTransportInfo () const noexceptoverride
 
void sendBody (std::unique_ptr< folly::IOBuf > body) noexceptoverride
 
- Public Member Functions inherited from proxygen::ResponseHandler
 ResponseHandler (RequestHandler *upstream)
 
virtual ~ResponseHandler ()
 
virtual void sendHeaders (HTTPMessage &msg) noexcept=0
 
virtual void sendChunkHeader (size_t len) noexcept=0
 
virtual void sendChunkTerminator () noexcept=0
 
virtual void sendEOM () noexcept=0
 
virtual void sendAbort () noexcept=0
 
virtual void refreshTimeout () noexcept=0
 
virtual void pauseIngress () noexcept=0
 
virtual void resumeIngress () noexcept=0
 
virtual ResponseHandlernewPushedResponse (PushHandler *pushHandler) noexcept=0
 
virtual ResponseHandlernewExMessage (ExMessageHandler *, bool=false) noexcept
 
virtual void getCurrentTransportInfo (wangle::TransportInfo *tinfo) const =0
 
HTTPTransactiongetTransaction () const noexcept
 

Public Attributes

wangle::TransportInfo transportInfo
 

Additional Inherited Members

- Protected Attributes inherited from proxygen::ResponseHandler
RequestHandlerupstream_ {nullptr}
 
HTTPTransactiontxn_ {nullptr}
 

Detailed Description

Mocks to help with testing

Definition at line 22 of file Mocks.h.

Constructor & Destructor Documentation

Member Function Documentation

const wangle::TransportInfo& proxygen::MockResponseHandler::getSetupTransportInfo ( ) const
inlineoverridevirtualnoexcept

Implements proxygen::ResponseHandler.

Definition at line 48 of file Mocks.h.

References transportInfo.

48  {
49  return transportInfo;
50  }
wangle::TransportInfo transportInfo
Definition: Mocks.h:60
proxygen::MockResponseHandler::GMOCK_METHOD0_ ( noexcept  ,
sendChunkTerminator  ,
void()   
)

Referenced by MockResponseHandler().

proxygen::MockResponseHandler::GMOCK_METHOD0_ ( noexcept  ,
sendEOM  ,
void()   
)
proxygen::MockResponseHandler::GMOCK_METHOD0_ ( noexcept  ,
sendAbort  ,
void()   
)
proxygen::MockResponseHandler::GMOCK_METHOD0_ ( noexcept  ,
refreshTimeout  ,
void()   
)
proxygen::MockResponseHandler::GMOCK_METHOD0_ ( noexcept  ,
pauseIngress  ,
void()   
)
proxygen::MockResponseHandler::GMOCK_METHOD0_ ( noexcept  ,
resumeIngress  ,
void()   
)
proxygen::MockResponseHandler::GMOCK_METHOD1_ ( noexcept  ,
sendHeaders  ,
void(HTTPMessage &)   
)

Referenced by MockResponseHandler().

proxygen::MockResponseHandler::GMOCK_METHOD1_ ( noexcept  ,
sendChunkHeader  ,
void(size_t)   
)
proxygen::MockResponseHandler::GMOCK_METHOD1_ ( noexcept  ,
sendBody  ,
void(std::shared_ptr< folly::IOBuf >)   
)
proxygen::MockResponseHandler::GMOCK_METHOD1_ ( noexcept  ,
newPushedResponse  ,
ResponseHandler PushHandler * 
)
proxygen::MockResponseHandler::MOCK_CONST_METHOD1 ( getCurrentTransportInfo  ,
void(wangle::TransportInfo *)   
)

Referenced by MockResponseHandler().

void proxygen::MockResponseHandler::sendBody ( std::unique_ptr< folly::IOBuf body)
inlineoverridevirtualnoexcept

Implements proxygen::ResponseHandler.

Definition at line 52 of file Mocks.h.

Referenced by MockResponseHandler().

52  {
53  if (body) {
54  sendBody(std::shared_ptr<folly::IOBuf>(body.release()));
55  } else {
56  sendBody(std::shared_ptr<folly::IOBuf>(nullptr));
57  }
58  }
void sendBody(std::unique_ptr< folly::IOBuf > body) noexceptoverride
Definition: Mocks.h:52

Member Data Documentation

wangle::TransportInfo proxygen::MockResponseHandler::transportInfo

Definition at line 60 of file Mocks.h.

Referenced by getSetupTransportInfo().


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