proxygen
proxygen::HTTPCodecFactory Class Referenceabstract

#include <HTTPCodecFactory.h>

Inheritance diagram for proxygen::HTTPCodecFactory:
proxygen::DefaultHTTPCodecFactory proxygen::HTTPDefaultSessionCodecFactory

Public Member Functions

 HTTPCodecFactory ()
 
virtual ~HTTPCodecFactory ()
 
virtual std::unique_ptr< HTTPCodecgetCodec (const std::string &protocolHint, TransportDirection direction, bool isTLS)=0
 

Static Public Member Functions

static std::unique_ptr< HTTPCodecgetCodec (CodecProtocol protocol, TransportDirection direction)
 

Detailed Description

Factory for produces HTTPCodec objects.

Definition at line 20 of file HTTPCodecFactory.h.

Constructor & Destructor Documentation

proxygen::HTTPCodecFactory::HTTPCodecFactory ( )
inlineexplicit

Definition at line 22 of file HTTPCodecFactory.h.

22 {}
virtual proxygen::HTTPCodecFactory::~HTTPCodecFactory ( )
inlinevirtual

Definition at line 23 of file HTTPCodecFactory.h.

References getCodec(), and string.

23 {}

Member Function Documentation

virtual std::unique_ptr<HTTPCodec> proxygen::HTTPCodecFactory::getCodec ( const std::string protocolHint,
TransportDirection  direction,
bool  isTLS 
)
pure virtual
std::unique_ptr< HTTPCodec > proxygen::HTTPCodecFactory::getCodec ( CodecProtocol  protocol,
TransportDirection  direction 
)
static

Definition at line 17 of file HTTPCodecFactory.cpp.

References proxygen::HTTP_1_1, proxygen::HTTP_2, proxygen::SPDY3, proxygen::SPDY3_1, proxygen::SPDY_3, and proxygen::SPDY_3_1.

18  {
19  switch (protocol) {
21  return std::make_unique<HTTP1xCodec>(direction);
23  return std::make_unique<SPDYCodec>(direction, SPDYVersion::SPDY3);
25  return std::make_unique<SPDYCodec>(direction, SPDYVersion::SPDY3_1);
27  return std::make_unique<HTTP2Codec>(direction);
28  default:
29  LOG(FATAL) << "Unreachable";
30  return nullptr;
31  }
32 }

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