proxygen
proxygen::HTTPSessionController Class Referenceabstract

#include <HTTPSessionController.h>

Inheritance diagram for proxygen::HTTPSessionController:
proxygen::HTTPUpstreamSessionController proxygen::MockController proxygen::SimpleController proxygen::MockUpstreamController

Public Member Functions

virtual ~HTTPSessionController ()
 
virtual HTTPTransactionHandlergetRequestHandler (HTTPTransaction &txn, HTTPMessage *msg)=0
 
virtual HTTPTransactionHandlergetParseErrorHandler (HTTPTransaction *txn, const HTTPException &error, const folly::SocketAddress &localAddress)=0
 
virtual HTTPTransactionHandlergetTransactionTimeoutHandler (HTTPTransaction *txn, const folly::SocketAddress &localAddress)=0
 
virtual void attachSession (HTTPSessionBase *session)=0
 
virtual void detachSession (const HTTPSessionBase *session)=0
 
virtual void onSessionCodecChange (HTTPSessionBase *)
 
virtual std::chrono::milliseconds getGracefulShutdownTimeout () const
 
virtual std::chrono::milliseconds getSessionFlowControlTimeout () const
 
virtual const HeaderIndexingStrategygetHeaderIndexingStrategy () const
 

Detailed Description

Definition at line 28 of file HTTPSessionController.h.

Constructor & Destructor Documentation

virtual proxygen::HTTPSessionController::~HTTPSessionController ( )
inlinevirtual

Definition at line 30 of file HTTPSessionController.h.

References folly::pushmi::operators::error().

30 {}

Member Function Documentation

virtual void proxygen::HTTPSessionController::attachSession ( HTTPSessionBase session)
pure virtual

Inform the controller it is associated with this particular session.

Implemented in proxygen::SimpleController.

virtual void proxygen::HTTPSessionController::detachSession ( const HTTPSessionBase session)
pure virtual

Informed at the end when the given HTTPSession is going away.

Implemented in proxygen::SimpleController.

Referenced by proxygen::HTTPSessionBase::runDestroyCallbacks().

virtual std::chrono::milliseconds proxygen::HTTPSessionController::getGracefulShutdownTimeout ( ) const
inlinevirtual

Optionally allow the session to query custom graceful shutdown timeout.

Reimplemented in proxygen::SimpleController.

Definition at line 82 of file HTTPSessionController.h.

Referenced by proxygen::HTTPSession::readTimeoutExpired().

82  {
83  return std::chrono::milliseconds(0);
84  }
virtual const HeaderIndexingStrategy* proxygen::HTTPSessionController::getHeaderIndexingStrategy ( ) const
inlinevirtual

Returns the H2 header indexing strategy to be employed by the session

Definition at line 96 of file HTTPSessionController.h.

Referenced by proxygen::HTTPSessionBase::initCodecHeaderIndexingStrategy().

96  {
98  }
static const HeaderIndexingStrategy * getDefaultInstance()
virtual HTTPTransactionHandler* proxygen::HTTPSessionController::getParseErrorHandler ( HTTPTransaction txn,
const HTTPException error,
const folly::SocketAddress localAddress 
)
pure virtual

Will be invoked when HTTPSession is unable to parse a new request on the connection because of bad input.

error contains specific information about what went wrong

Implemented in proxygen::HTTPUpstreamSessionController, and proxygen::SimpleController.

Referenced by proxygen::HTTPSessionBase::getParseErrorHandler().

virtual HTTPTransactionHandler* proxygen::HTTPSessionController::getRequestHandler ( HTTPTransaction txn,
HTTPMessage msg 
)
pure virtual

Will be invoked whenever HTTPSession successfully parses a request

The controller creates a Handler for a new transaction. The transaction and HTTP message (request) are passed so the implementation can construct different handlers based on these. The transaction will be explicitly set on the handler later via setTransaction. The request message will be passed in onHeadersComplete.

Implemented in proxygen::HTTPUpstreamSessionController, and proxygen::SimpleController.

Referenced by proxygen::HTTPDownstreamSession::setupOnHeadersComplete().

virtual std::chrono::milliseconds proxygen::HTTPSessionController::getSessionFlowControlTimeout ( ) const
inlinevirtual

Optionally allow the session to query custom flow control timeout.

Definition at line 89 of file HTTPSessionController.h.

89  {
90  return std::chrono::milliseconds(0);
91  }
virtual HTTPTransactionHandler* proxygen::HTTPSessionController::getTransactionTimeoutHandler ( HTTPTransaction txn,
const folly::SocketAddress localAddress 
)
pure virtual

Will be invoked when HTTPSession times out parsing a new request.

Implemented in proxygen::HTTPUpstreamSessionController, and proxygen::SimpleController.

Referenced by proxygen::HTTPDownstreamSession::getTransactionTimeoutHandler().

virtual void proxygen::HTTPSessionController::onSessionCodecChange ( HTTPSessionBase )
inlinevirtual

Inform the controller that the session's codec changed

Definition at line 77 of file HTTPSessionController.h.

Referenced by proxygen::HTTPSessionBase::onCodecChanged().

77 {}

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