proxygen
|
#include <HTTPSessionMocks.h>
Public Member Functions | |
MockHTTPHandler () | |
MockHTTPHandler (HTTPTransaction &txn, HTTPMessage *msg, const folly::SocketAddress &) | |
GMOCK_METHOD1_ (, noexcept,, setTransaction, void(HTTPTransaction *txn)) | |
GMOCK_METHOD0_ (, noexcept,, detachTransaction, void()) | |
void | onHeadersComplete (std::unique_ptr< HTTPMessage > msg) noexceptoverride |
GMOCK_METHOD1_ (, noexcept,, onHeadersComplete, void(std::shared_ptr< HTTPMessage > msg)) | |
void | onBody (std::unique_ptr< folly::IOBuf > chain) noexceptoverride |
GMOCK_METHOD1_ (, noexcept,, onBody, void(std::shared_ptr< folly::IOBuf > chain)) | |
GMOCK_METHOD1_ (, noexcept,, onChunkHeader, void(size_t length)) | |
GMOCK_METHOD0_ (, noexcept,, onChunkComplete, void()) | |
void | onTrailers (std::unique_ptr< HTTPHeaders > trailers) noexceptoverride |
GMOCK_METHOD1_ (, noexcept,, onTrailers, void(std::shared_ptr< HTTPHeaders > trailers)) | |
GMOCK_METHOD0_ (, noexcept,, onEOM, void()) | |
GMOCK_METHOD1_ (, noexcept,, onUpgrade, void(UpgradeProtocol protocol)) | |
GMOCK_METHOD1_ (, noexcept,, onError, void(const HTTPException &error)) | |
GMOCK_METHOD1_ (, noexcept,, onGoaway, void(ErrorCode)) | |
GMOCK_METHOD0_ (, noexcept,, onEgressPaused, void()) | |
GMOCK_METHOD0_ (, noexcept,, onEgressResumed, void()) | |
GMOCK_METHOD1_ (, noexcept,, onPushedTransaction, void(HTTPTransaction *)) | |
GMOCK_METHOD1_ (, noexcept,, onExTransaction, void(HTTPTransaction *)) | |
void | expectTransaction (std::function< void(HTTPTransaction *txn)> callback) |
void | expectTransaction (HTTPTransaction **pTxn=nullptr) |
void | expectHeaders (std::function< void()> callback=std::function< void()>()) |
void | expectHeaders (std::function< void(std::shared_ptr< HTTPMessage >)> cb) |
void | expectTrailers (std::function< void(std::shared_ptr< HTTPHeaders > trailers)> cb) |
void | expectChunkHeader (std::function< void()> callback=std::function< void()>()) |
void | expectBody (std::function< void()> callback=std::function< void()>()) |
void | expectBody (std::function< void(std::shared_ptr< folly::IOBuf >)> callback) |
void | expectChunkComplete (std::function< void()> callback=std::function< void()>()) |
void | expectEOM (std::function< void()> callback=std::function< void()>()) |
void | expectEgressPaused (std::function< void()> callback=std::function< void()>()) |
void | expectEgressResumed (std::function< void()> callback=std::function< void()>()) |
void | expectError (std::function< void(const HTTPException &ex)> callback=std::function< void(const HTTPException &ex)>()) |
void | expectGoaway (std::function< void(ErrorCode)> callback=std::function< void(ErrorCode)>()) |
void | expectDetachTransaction (std::function< void()> callback=std::function< void()>()) |
Public Member Functions inherited from proxygen::HTTPHandlerBase | |
HTTPHandlerBase () | |
HTTPHandlerBase (HTTPTransaction *txn, HTTPMessage *msg) | |
void | terminate () |
void | sendRequest () |
void | sendRequest (HTTPMessage req) |
void | sendHeaders (uint32_t code, uint32_t content_length, bool keepalive=true, HeaderMap headers=HeaderMap()) |
void | sendReply () |
void | sendReplyCode (uint32_t code) |
void | sendBody (uint32_t content_length) |
void | sendBodyWithLastByteTracking (uint32_t content_length) |
void | sendReplyWithBody (uint32_t code, uint32_t content_length, bool keepalive=true, bool sendEOM=true, bool hasTrailers=false) |
void | sendEOM () |
void | sendChunkedReplyWithBody (uint32_t code, uint32_t content_length, uint32_t chunkSize, bool hasTrailers, bool sendEOM=true) |
Public Member Functions inherited from proxygen::HTTPTransactionHandler | |
virtual void | setTransaction (HTTPTransaction *txn) noexcept=0 |
virtual void | detachTransaction () noexcept=0 |
virtual void | onChunkHeader (size_t) noexcept |
virtual void | onChunkComplete () noexcept |
virtual void | onEOM () noexcept=0 |
virtual void | onUpgrade (UpgradeProtocol protocol) noexcept=0 |
virtual void | onError (const HTTPException &error) noexcept=0 |
virtual void | onEgressPaused () noexcept=0 |
virtual void | onEgressResumed () noexcept=0 |
virtual void | onPushedTransaction (HTTPTransaction *) noexcept |
virtual void | onExTransaction (HTTPTransaction *) noexcept |
virtual void | onGoaway (ErrorCode) noexcept |
virtual | ~HTTPTransactionHandler () |
Additional Inherited Members | |
Public Types inherited from proxygen::HTTPHandlerBase | |
using | HeaderMap = std::map< std::string, std::string > |
Public Attributes inherited from proxygen::HTTPHandlerBase | |
HTTPTransaction * | txn_ {nullptr} |
std::shared_ptr< HTTPMessage > | msg_ |
Definition at line 142 of file HTTPSessionMocks.h.
|
inline |
Definition at line 146 of file HTTPSessionMocks.h.
|
inline |
Definition at line 148 of file HTTPSessionMocks.h.
References GMOCK_NOEXCEPT_METHOD0, and GMOCK_NOEXCEPT_METHOD1.
|
inline |
Definition at line 241 of file HTTPSessionMocks.h.
References testing::_, EXPECT_CALL, and testing::InvokeWithoutArgs().
Referenced by TEST_F().
|
inline |
Definition at line 250 of file HTTPSessionMocks.h.
References testing::_, EXPECT_CALL, and testing::Invoke().
|
inline |
Definition at line 254 of file HTTPSessionMocks.h.
References EXPECT_CALL, and testing::InvokeWithoutArgs().
|
inline |
Definition at line 231 of file HTTPSessionMocks.h.
References testing::_, EXPECT_CALL, and testing::InvokeWithoutArgs().
|
inline |
Definition at line 310 of file HTTPSessionMocks.h.
References EXPECT_CALL, and testing::Invoke().
Referenced by HTTPDownstreamTest< SPDY3_1CodecPair >::onEOMTerminateHandlerExpectShutdown(), and TEST_F().
|
inline |
Definition at line 272 of file HTTPSessionMocks.h.
References EXPECT_CALL, and testing::Invoke().
|
inline |
Definition at line 281 of file HTTPSessionMocks.h.
References EXPECT_CALL, and testing::Invoke().
|
inline |
Definition at line 264 of file HTTPSessionMocks.h.
References EXPECT_CALL, and testing::Invoke().
Referenced by HTTPDownstreamTest< SPDY3_1CodecPair >::onEOMTerminateHandlerExpectShutdown(), and TEST_F().
|
inline |
Definition at line 290 of file HTTPSessionMocks.h.
References testing::_, EXPECT_CALL, and testing::Invoke().
|
inline |
Definition at line 300 of file HTTPSessionMocks.h.
References testing::_, EXPECT_CALL, and testing::Invoke().
|
inline |
Definition at line 208 of file HTTPSessionMocks.h.
References testing::_, EXPECT_CALL, and testing::InvokeWithoutArgs().
Referenced by TEST_F().
|
inline |
Definition at line 218 of file HTTPSessionMocks.h.
References testing::_, EXPECT_CALL, and testing::Invoke().
|
inline |
Definition at line 224 of file HTTPSessionMocks.h.
References testing::_, EXPECT_CALL, and testing::Invoke().
|
inline |
Definition at line 197 of file HTTPSessionMocks.h.
References testing::_, EXPECT_CALL, and testing::Invoke().
Referenced by TEST_F().
|
inline |
Definition at line 203 of file HTTPSessionMocks.h.
References testing::_, EXPECT_CALL, and proxygen::HTTPHandlerBase::txn_.
proxygen::MockHTTPHandler::GMOCK_METHOD0_ | ( | noexcept | , |
detachTransaction | , | ||
void() | |||
) |
proxygen::MockHTTPHandler::GMOCK_METHOD0_ | ( | noexcept | , |
onChunkComplete | , | ||
void() | |||
) |
proxygen::MockHTTPHandler::GMOCK_METHOD0_ | ( | noexcept | , |
onEOM | , | ||
void() | |||
) |
proxygen::MockHTTPHandler::GMOCK_METHOD0_ | ( | noexcept | , |
onEgressPaused | , | ||
void() | |||
) |
proxygen::MockHTTPHandler::GMOCK_METHOD0_ | ( | noexcept | , |
onEgressResumed | , | ||
void() | |||
) |
proxygen::MockHTTPHandler::GMOCK_METHOD1_ | ( | noexcept | , |
setTransaction | , | ||
void(HTTPTransaction *txn) | |||
) |
proxygen::MockHTTPHandler::GMOCK_METHOD1_ | ( | noexcept | , |
onHeadersComplete | , | ||
void(std::shared_ptr< HTTPMessage > msg) | |||
) |
proxygen::MockHTTPHandler::GMOCK_METHOD1_ | ( | noexcept | , |
onBody | , | ||
void(std::shared_ptr< folly::IOBuf > chain) | |||
) |
proxygen::MockHTTPHandler::GMOCK_METHOD1_ | ( | noexcept | , |
onChunkHeader | , | ||
void(size_t length) | |||
) |
proxygen::MockHTTPHandler::GMOCK_METHOD1_ | ( | noexcept | , |
onTrailers | , | ||
void(std::shared_ptr< HTTPHeaders > trailers) | |||
) |
proxygen::MockHTTPHandler::GMOCK_METHOD1_ | ( | noexcept | , |
onUpgrade | , | ||
void(UpgradeProtocol protocol) | |||
) |
proxygen::MockHTTPHandler::GMOCK_METHOD1_ | ( | noexcept | , |
onError | , | ||
void(const HTTPException &error) | |||
) |
proxygen::MockHTTPHandler::GMOCK_METHOD1_ | ( | noexcept | , |
onPushedTransaction | , | ||
void(HTTPTransaction *) | |||
) |
proxygen::MockHTTPHandler::GMOCK_METHOD1_ | ( | noexcept | , |
onExTransaction | , | ||
void(HTTPTransaction *) | |||
) |
|
inlineoverridevirtualnoexcept |
Can be called multiple times per transaction. If you had previously called pauseIngress(), this callback will be delayed until you call resumeIngress().
Implements proxygen::HTTPTransactionHandler.
Definition at line 165 of file HTTPSessionMocks.h.
References GMOCK_NOEXCEPT_METHOD0, and GMOCK_NOEXCEPT_METHOD1.
|
inlineoverridevirtualnoexcept |
Called at most once per transaction. This is usually the first ingress callback. It is possible to get a read error before this however. If you had previously called pauseIngress(), this callback will be delayed until you call resumeIngress().
Implements proxygen::HTTPTransactionHandler.
Definition at line 158 of file HTTPSessionMocks.h.
References GMOCK_NOEXCEPT_METHOD1.
|
inlineoverridevirtualnoexcept |
Can be called any number of times per transaction. If you had previously called pauseIngress(), this callback will be delayed until you call resumeIngress(). Trailers can be received once right before the EOM of a chunked HTTP/1.1 reponse or multiple times per transaction from SPDY and HTTP/2.0 HEADERS frames.
Implements proxygen::HTTPTransactionHandler.
Definition at line 174 of file HTTPSessionMocks.h.
References folly::pushmi::operators::error(), GMOCK_NOEXCEPT_METHOD0, and GMOCK_NOEXCEPT_METHOD1.