proxygen
|
#include <HTTPMessageFilters.h>
Public Member Functions | |
void | setNextTransactionHandler (HTTPTransaction::Handler *next) |
HTTPTransaction::Handler * | getNextTransactionHandler () |
virtual std::unique_ptr< HTTPMessageFilter > | clone () noexcept=0 |
void | onHeadersComplete (std::unique_ptr< HTTPMessage > msg) noexceptoverride |
void | onBody (std::unique_ptr< folly::IOBuf > chain) noexceptoverride |
void | onChunkHeader (size_t length) noexceptoverride |
void | onChunkComplete () noexceptoverride |
void | onTrailers (std::unique_ptr< HTTPHeaders > trailers) noexceptoverride |
void | onEOM () noexceptoverride |
void | onUpgrade (UpgradeProtocol protocol) noexceptoverride |
void | onError (const HTTPException &error) noexceptoverride |
void | setTransaction (HTTPTransaction *txn) noexceptfinal |
void | detachTransaction () noexceptfinal |
void | onEgressPaused () noexceptfinal |
void | onEgressResumed () noexceptfinal |
void | onPushedTransaction (HTTPTransaction *txn) noexceptfinal |
void | onExTransaction (HTTPTransaction *txn) noexceptfinal |
virtual const std::string & | getFilterName () noexcept |
Public Member Functions inherited from proxygen::HTTPTransactionHandler | |
virtual void | onGoaway (ErrorCode) noexcept |
virtual | ~HTTPTransactionHandler () |
Public Member Functions inherited from folly::DestructorCheck | |
virtual | ~DestructorCheck () |
Protected Member Functions | |
void | nextOnHeadersComplete (std::unique_ptr< HTTPMessage > msg) |
void | nextOnBody (std::unique_ptr< folly::IOBuf > chain) |
void | nextOnChunkHeader (size_t length) |
void | nextOnChunkComplete () |
void | nextOnTrailers (std::unique_ptr< HTTPHeaders > trailers) |
void | nextOnEOM () |
void | nextOnError (const HTTPException &ex) |
Protected Attributes | |
HTTPTransaction::Handler * | nextTransactionHandler_ {nullptr} |
Definition at line 20 of file HTTPMessageFilters.h.
|
pure virtualnoexcept |
Implemented in proxygen::MockHTTPMessageFilter.
Referenced by getNextTransactionHandler().
|
inlinefinalvirtualnoexcept |
Called once after a transaction successfully completes. It will be called even if a read or write error happened earlier. This is a terminal callback, which means that the HTTPTransaction object that gives this call will be invalid after this function completes.
Implements proxygen::HTTPTransactionHandler.
Definition at line 63 of file HTTPMessageFilters.h.
References proxygen::HTTPTransactionHandler::detachTransaction(), and nextTransactionHandler_.
|
inlinevirtualnoexcept |
Reimplemented in proxygen::MockHTTPMessageFilter.
Definition at line 79 of file HTTPMessageFilters.h.
References proxygen::kMessageFilterDefaultName_.
|
inline |
Definition at line 26 of file HTTPMessageFilters.h.
References clone(), nextTransactionHandler_, and folly::pushmi::__adl::noexcept().
|
inlineprotected |
Definition at line 86 of file HTTPMessageFilters.h.
References folly::gen::move, nextTransactionHandler_, and proxygen::HTTPTransactionHandler::onBody().
|
inlineprotected |
Definition at line 92 of file HTTPMessageFilters.h.
References nextTransactionHandler_, and proxygen::HTTPTransactionHandler::onChunkComplete().
|
inlineprotected |
Definition at line 89 of file HTTPMessageFilters.h.
References nextTransactionHandler_, and proxygen::HTTPTransactionHandler::onChunkHeader().
|
inlineprotected |
Definition at line 98 of file HTTPMessageFilters.h.
References nextTransactionHandler_, and proxygen::HTTPTransactionHandler::onEOM().
Referenced by proxygen::MockHTTPMessageFilter::nextOnEOMPublic().
|
inlineprotected |
Definition at line 101 of file HTTPMessageFilters.h.
References nextTransactionHandler_, and proxygen::HTTPTransactionHandler::onError().
|
inlineprotected |
Definition at line 83 of file HTTPMessageFilters.h.
References folly::gen::move, nextTransactionHandler_, and proxygen::HTTPTransactionHandler::onHeadersComplete().
Referenced by proxygen::MockHTTPMessageFilter::nextOnHeadersCompletePublic().
|
inlineprotected |
Definition at line 95 of file HTTPMessageFilters.h.
References folly::gen::move, nextTransactionHandler_, and proxygen::HTTPTransactionHandler::onTrailers().
|
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.
Reimplemented in proxygen::MockHTTPMessageFilter.
Definition at line 37 of file HTTPMessageFilters.h.
References folly::gen::move, nextTransactionHandler_, and proxygen::HTTPTransactionHandler::onBody().
|
inlineoverridevirtualnoexcept |
Can be called multiple times per transaction. If you had previously called pauseIngress(), this callback will be delayed until you call resumeIngress(). This signifies the end of a chunk.
Reimplemented from proxygen::HTTPTransactionHandler.
Definition at line 43 of file HTTPMessageFilters.h.
References nextTransactionHandler_, and proxygen::HTTPTransactionHandler::onChunkComplete().
Referenced by proxygen::MockHTTPMessageFilter::onBody().
|
inlineoverridevirtualnoexcept |
Can be called multiple times per transaction. If you had previously called pauseIngress(), this callback will be delayed until you call resumeIngress(). This signifies the beginning of a chunk of length 'length'. You will receive onBody() after this. Also, the length will be greater than zero.
Reimplemented from proxygen::HTTPTransactionHandler.
Definition at line 40 of file HTTPMessageFilters.h.
References nextTransactionHandler_, and proxygen::HTTPTransactionHandler::onChunkHeader().
Referenced by proxygen::MockHTTPMessageFilter::onBody().
|
inlinefinalvirtualnoexcept |
If the remote side's receive buffer fills up, this callback will be invoked so you can attempt to stop sending to the remote side.
Implements proxygen::HTTPTransactionHandler.
Definition at line 66 of file HTTPMessageFilters.h.
References nextTransactionHandler_, and proxygen::HTTPTransactionHandler::onEgressPaused().
|
inlinefinalvirtualnoexcept |
This callback lets you know that the remote side has resumed reading and you can now continue to send data.
Implements proxygen::HTTPTransactionHandler.
Definition at line 69 of file HTTPMessageFilters.h.
References nextTransactionHandler_, and proxygen::HTTPTransactionHandler::onEgressResumed().
|
inlineoverridevirtualnoexcept |
Can be called once per transaction. If you had previously called pauseIngress(), this callback will be delayed until you call resumeIngress(). After this callback is received, there will be no more normal ingress callbacks received (onEgress*() and onError() may still be invoked). The Handler should consider ingress complete after receiving this message. This Transaction is still valid, and work may still occur on it until detachTransaction is called.
Implements proxygen::HTTPTransactionHandler.
Definition at line 49 of file HTTPMessageFilters.h.
References nextTransactionHandler_, and proxygen::HTTPTransactionHandler::onEOM().
Referenced by proxygen::MockHTTPMessageFilter::onTrailers().
|
inlineoverridevirtualnoexcept |
Can be called at any time before detachTransaction(). This callback implies that an error has occurred. To determine if ingress or egress is affected, check the direciont on the HTTPException. If the direction is INGRESS, it MAY still be possible to send egress.
Implements proxygen::HTTPTransactionHandler.
Definition at line 55 of file HTTPMessageFilters.h.
References folly::pushmi::operators::error(), nextTransactionHandler_, and proxygen::HTTPTransactionHandler::onError().
Referenced by proxygen::MockHTTPMessageFilter::onTrailers().
|
inlinefinalvirtualnoexcept |
Ask the handler to construct a handler for a ExTransaction associated with its transaction.
Reimplemented from proxygen::HTTPTransactionHandler.
Definition at line 75 of file HTTPMessageFilters.h.
References nextTransactionHandler_, and proxygen::HTTPTransactionHandler::onExTransaction().
|
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.
Reimplemented in proxygen::MockHTTPMessageFilter.
Definition at line 34 of file HTTPMessageFilters.h.
References folly::gen::move, nextTransactionHandler_, and proxygen::HTTPTransactionHandler::onHeadersComplete().
|
inlinefinalvirtualnoexcept |
Ask the handler to construct a handler for a pushed transaction associated with its transaction.
TODO: Reconsider default implementation here. If the handler does not implement, better set max initiated to 0 in a settings frame?
Reimplemented from proxygen::HTTPTransactionHandler.
Definition at line 72 of file HTTPMessageFilters.h.
References nextTransactionHandler_, and proxygen::HTTPTransactionHandler::onPushedTransaction().
|
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.
Reimplemented in proxygen::MockHTTPMessageFilter.
Definition at line 46 of file HTTPMessageFilters.h.
References folly::gen::move, nextTransactionHandler_, and proxygen::HTTPTransactionHandler::onTrailers().
|
inlineoverridevirtualnoexcept |
Can be called once per transaction. If you had previously called pauseIngress(), this callback will be delayed until you call resumeIngress(). After this callback is invoked, further data will be forwarded using the onBody() callback. Once the data transfer is completed (EOF recevied in case of CONNECT), onEOM() callback will be invoked.
Implements proxygen::HTTPTransactionHandler.
Definition at line 52 of file HTTPMessageFilters.h.
References nextTransactionHandler_, and proxygen::HTTPTransactionHandler::onUpgrade().
Referenced by proxygen::MockHTTPMessageFilter::onTrailers().
|
inline |
Definition at line 23 of file HTTPMessageFilters.h.
References nextTransactionHandler_.
|
inlinefinalvirtualnoexcept |
Called once per transaction. This notifies the handler of which transaction it should talk to and will receive callbacks from.
Implements proxygen::HTTPTransactionHandler.
Definition at line 60 of file HTTPMessageFilters.h.
References nextTransactionHandler_, and proxygen::HTTPTransactionHandler::setTransaction().
|
protected |
Definition at line 104 of file HTTPMessageFilters.h.
Referenced by detachTransaction(), getNextTransactionHandler(), nextOnBody(), nextOnChunkComplete(), nextOnChunkHeader(), nextOnEOM(), nextOnError(), nextOnHeadersComplete(), nextOnTrailers(), onBody(), onChunkComplete(), onChunkHeader(), onEgressPaused(), onEgressResumed(), onEOM(), onError(), onExTransaction(), onHeadersComplete(), onPushedTransaction(), onTrailers(), onUpgrade(), setNextTransactionHandler(), and setTransaction().