proxygen
proxygen::HTTPPushTransactionHandler Class Reference

#include <HTTPTransaction.h>

Inheritance diagram for proxygen::HTTPPushTransactionHandler:
proxygen::HTTPTransactionHandler proxygen::MockHTTPPushHandler proxygen::PushHandler::InnerPushHandler

Public Member Functions

 ~HTTPPushTransactionHandler () override
 
void onHeadersComplete (std::unique_ptr< HTTPMessage >) noexceptfinal
 
void onBody (std::unique_ptr< folly::IOBuf >) noexceptfinal
 
void onChunkHeader (size_t) noexceptfinal
 
void onChunkComplete () noexceptfinal
 
void onTrailers (std::unique_ptr< HTTPHeaders >) noexceptfinal
 
void onEOM () noexceptfinal
 
void onUpgrade (UpgradeProtocol) noexceptfinal
 
void onPushedTransaction (HTTPTransaction *) noexceptfinal
 
- Public Member Functions inherited from proxygen::HTTPTransactionHandler
virtual void setTransaction (HTTPTransaction *txn) noexcept=0
 
virtual void detachTransaction () noexcept=0
 
virtual void onError (const HTTPException &error) noexcept=0
 
virtual void onEgressPaused () noexcept=0
 
virtual void onEgressResumed () noexcept=0
 
virtual void onExTransaction (HTTPTransaction *) noexcept
 
virtual void onGoaway (ErrorCode) noexcept
 
virtual ~HTTPTransactionHandler ()
 

Detailed Description

Definition at line 261 of file HTTPTransaction.h.

Constructor & Destructor Documentation

proxygen::HTTPPushTransactionHandler::~HTTPPushTransactionHandler ( )
inlineoverride

Definition at line 263 of file HTTPTransaction.h.

263 {}

Member Function Documentation

void proxygen::HTTPPushTransactionHandler::onBody ( std::unique_ptr< folly::IOBuf chain)
inlinefinalvirtualnoexcept

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 269 of file HTTPTransaction.h.

269  {
270  LOG(FATAL) << "push txn received body";
271  }
void proxygen::HTTPPushTransactionHandler::onChunkComplete ( )
inlinefinalvirtualnoexcept

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 277 of file HTTPTransaction.h.

277  {
278  LOG(FATAL) << "push txn received chunk complete";
279  }
void proxygen::HTTPPushTransactionHandler::onChunkHeader ( size_t  )
inlinefinalvirtualnoexcept

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 273 of file HTTPTransaction.h.

273  {
274  LOG(FATAL) << "push txn received chunk header";
275  }
void proxygen::HTTPPushTransactionHandler::onEOM ( )
inlinefinalvirtualnoexcept

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 285 of file HTTPTransaction.h.

285  {
286  LOG(FATAL) << "push txn received EOM";
287  }
void proxygen::HTTPPushTransactionHandler::onHeadersComplete ( std::unique_ptr< HTTPMessage msg)
inlinefinalvirtualnoexcept

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 265 of file HTTPTransaction.h.

265  {
266  LOG(FATAL) << "push txn received headers";
267  }
void proxygen::HTTPPushTransactionHandler::onPushedTransaction ( HTTPTransaction )
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 293 of file HTTPTransaction.h.

293  {
294  LOG(FATAL) << "push txn received push txn";
295  }
void proxygen::HTTPPushTransactionHandler::onTrailers ( std::unique_ptr< HTTPHeaders trailers)
inlinefinalvirtualnoexcept

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 281 of file HTTPTransaction.h.

281  {
282  LOG(FATAL) << "push txn received trailers";
283  }
void proxygen::HTTPPushTransactionHandler::onUpgrade ( UpgradeProtocol  protocol)
inlinefinalvirtualnoexcept

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 289 of file HTTPTransaction.h.

289  {
290  LOG(FATAL) << "push txn received upgrade";
291  }

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