proxygen
|
#include <HTTPTransaction.h>
Public Member Functions | |
virtual void | setTransaction (HTTPTransaction *txn) noexcept=0 |
virtual void | detachTransaction () noexcept=0 |
virtual void | onHeadersComplete (std::unique_ptr< HTTPMessage > msg) noexcept=0 |
virtual void | onBody (std::unique_ptr< folly::IOBuf > chain) noexcept=0 |
virtual void | onChunkHeader (size_t) noexcept |
virtual void | onChunkComplete () noexcept |
virtual void | onTrailers (std::unique_ptr< HTTPHeaders > trailers) noexcept=0 |
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 () |
Definition at line 133 of file HTTPTransaction.h.
|
inlinevirtual |
Definition at line 258 of file HTTPTransaction.h.
|
pure virtualnoexcept |
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.
Implemented in ProxyService::ProxyHandler::ServerTransactionHandler, proxygen::HTTPMessageFilter, CurlService::CurlClient, proxygen::RequestHandlerAdaptor, proxygen::PushHandler::InnerPushHandler, proxygen::HTTPDirectResponseHandler, and proxygen::CodecErrorResponseHandler.
Referenced by proxygen::HTTPMessageFilter::detachTransaction(), and proxygen::HTTPTransaction::onDelayedDestroy().
|
pure virtualnoexcept |
Can be called multiple times per transaction. If you had previously called pauseIngress(), this callback will be delayed until you call resumeIngress().
Implemented in proxygen::HTTPPushTransactionHandler, proxygen::MockHTTPHandler, ProxyService::ProxyHandler::ServerTransactionHandler, CurlService::CurlClient, proxygen::RequestHandlerAdaptor, proxygen::HTTPMessageFilter, proxygen::HTTPDirectResponseHandler, proxygen::CodecErrorResponseHandler, and proxygen::MockHTTPMessageFilter.
Referenced by proxygen::HTTPMessageFilter::nextOnBody(), proxygen::HTTPMessageFilter::onBody(), and proxygen::HTTPTransaction::processIngressBody().
|
inlinevirtualnoexcept |
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 in proxygen::HTTPPushTransactionHandler, proxygen::RequestHandlerAdaptor, and proxygen::HTTPMessageFilter.
Definition at line 180 of file HTTPTransaction.h.
References folly::pushmi::operators::error().
Referenced by proxygen::HTTPMessageFilter::nextOnChunkComplete(), proxygen::HTTPMessageFilter::onChunkComplete(), and proxygen::HTTPTransaction::processIngressChunkComplete().
|
inlinevirtualnoexcept |
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 in proxygen::HTTPPushTransactionHandler, proxygen::RequestHandlerAdaptor, and proxygen::HTTPMessageFilter.
Definition at line 173 of file HTTPTransaction.h.
Referenced by proxygen::HTTPMessageFilter::nextOnChunkHeader(), proxygen::HTTPMessageFilter::onChunkHeader(), and proxygen::HTTPTransaction::processIngressChunkHeader().
|
pure virtualnoexcept |
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.
Implemented in ProxyService::ProxyHandler::ServerTransactionHandler, proxygen::HTTPMessageFilter, CurlService::CurlClient, proxygen::RequestHandlerAdaptor, proxygen::PushHandler::InnerPushHandler, proxygen::HTTPDirectResponseHandler, and proxygen::CodecErrorResponseHandler.
Referenced by proxygen::HTTPMessageFilter::onEgressPaused(), and proxygen::HTTPTransaction::updateHandlerPauseState().
|
pure virtualnoexcept |
This callback lets you know that the remote side has resumed reading and you can now continue to send data.
Implemented in ProxyService::ProxyHandler::ServerTransactionHandler, proxygen::HTTPMessageFilter, CurlService::CurlClient, proxygen::RequestHandlerAdaptor, proxygen::PushHandler::InnerPushHandler, proxygen::HTTPDirectResponseHandler, and proxygen::CodecErrorResponseHandler.
Referenced by proxygen::HTTPMessageFilter::onEgressResumed(), and proxygen::HTTPTransaction::updateHandlerPauseState().
|
pure virtualnoexcept |
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.
Implemented in proxygen::HTTPPushTransactionHandler, ProxyService::ProxyHandler::ServerTransactionHandler, CurlService::CurlClient, proxygen::RequestHandlerAdaptor, proxygen::HTTPMessageFilter, proxygen::HTTPDirectResponseHandler, and proxygen::CodecErrorResponseHandler.
Referenced by proxygen::HTTPMessageFilter::nextOnEOM(), proxygen::HTTPMessageFilter::onEOM(), and proxygen::HTTPTransaction::processIngressEOM().
|
pure virtualnoexcept |
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.
Implemented in ProxyService::ProxyHandler::ServerTransactionHandler, CurlService::CurlClient, proxygen::HTTPMessageFilter, proxygen::RequestHandlerAdaptor, proxygen::PushHandler::InnerPushHandler, proxygen::HTTPDirectResponseHandler, and proxygen::CodecErrorResponseHandler.
Referenced by proxygen::HTTPMessageFilter::nextOnError(), proxygen::HTTPMessageFilter::onError(), and proxygen::HTTPTransaction::onError().
|
inlinevirtualnoexcept |
Ask the handler to construct a handler for a ExTransaction associated with its transaction.
Reimplemented in proxygen::HTTPMessageFilter, and proxygen::RequestHandlerAdaptor.
Definition at line 247 of file HTTPTransaction.h.
Referenced by proxygen::HTTPMessageFilter::onExTransaction(), and proxygen::HTTPTransaction::onExTransaction().
|
inlinevirtualnoexcept |
Inform the handler that a GOAWAY has been received on the transport. This callback will only be invoked if the transport is SPDY or HTTP/2. It may be invoked multiple times, as HTTP/2 allows this.
code | The error code received in the GOAWAY frame |
Definition at line 256 of file HTTPTransaction.h.
Referenced by proxygen::HTTPTransaction::onGoaway().
|
pure virtualnoexcept |
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().
Implemented in proxygen::HTTPPushTransactionHandler, proxygen::MockHTTPHandler, ProxyService::ProxyHandler::ServerTransactionHandler, CurlService::CurlClient, proxygen::RequestHandlerAdaptor, proxygen::HTTPMessageFilter, proxygen::HTTPDirectResponseHandler, proxygen::CodecErrorResponseHandler, and proxygen::MockHTTPMessageFilter.
Referenced by proxygen::HTTPMessageFilter::nextOnHeadersComplete(), proxygen::HTTPMessageFilter::onHeadersComplete(), proxygen::HTTPTransaction::processIngressHeadersComplete(), and testExpectHandling().
|
inlinevirtualnoexcept |
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 in proxygen::HTTPPushTransactionHandler, and proxygen::HTTPMessageFilter.
Definition at line 241 of file HTTPTransaction.h.
Referenced by proxygen::HTTPMessageFilter::onPushedTransaction(), and proxygen::HTTPTransaction::onPushedTransaction().
|
pure virtualnoexcept |
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.
Implemented in proxygen::HTTPPushTransactionHandler, proxygen::MockHTTPHandler, ProxyService::ProxyHandler::ServerTransactionHandler, CurlService::CurlClient, proxygen::RequestHandlerAdaptor, proxygen::HTTPMessageFilter, proxygen::MockHTTPMessageFilter, proxygen::HTTPDirectResponseHandler, and proxygen::CodecErrorResponseHandler.
Referenced by proxygen::HTTPMessageFilter::nextOnTrailers(), proxygen::HTTPMessageFilter::onTrailers(), and proxygen::HTTPTransaction::processIngressTrailers().
|
pure virtualnoexcept |
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.
Implemented in proxygen::HTTPPushTransactionHandler, ProxyService::ProxyHandler::ServerTransactionHandler, CurlService::CurlClient, proxygen::HTTPMessageFilter, proxygen::RequestHandlerAdaptor, proxygen::HTTPDirectResponseHandler, and proxygen::CodecErrorResponseHandler.
Referenced by proxygen::HTTPMessageFilter::onUpgrade(), and proxygen::HTTPTransaction::processIngressUpgrade().
|
pure virtualnoexcept |
Called once per transaction. This notifies the handler of which transaction it should talk to and will receive callbacks from.
Implemented in ProxyService::ProxyHandler::ServerTransactionHandler, proxygen::HTTPMessageFilter, CurlService::CurlClient, proxygen::RequestHandlerAdaptor, proxygen::PushHandler::InnerPushHandler, proxygen::HTTPDirectResponseHandler, and proxygen::CodecErrorResponseHandler.
Referenced by proxygen::HTTPMessageFilter::setTransaction().