AWS SDK for C++  1.9.1
AWS SDK for C++
HttpClient.h
Go to the documentation of this file.
1 
6 #pragma once
7 
9 
10 #include <memory>
11 #include <atomic>
12 #include <mutex>
13 #include <condition_variable>
14 
15 namespace Aws
16 {
17  namespace Utils
18  {
19  namespace RateLimits
20  {
21  class RateLimiterInterface;
22  } // namespace RateLimits
23  } // namespace Utils
24 
25  namespace Http
26  {
27  class HttpRequest;
28  class HttpResponse;
29 
34  {
35  public:
37  virtual ~HttpClient() {}
38 
42  virtual std::shared_ptr<HttpResponse> MakeRequest(const std::shared_ptr<HttpRequest>& request,
43  Aws::Utils::RateLimits::RateLimiterInterface* readLimiter = nullptr,
44  Aws::Utils::RateLimits::RateLimiterInterface* writeLimiter = nullptr) const = 0;
45 
49  virtual bool SupportsChunkedTransferEncoding() const { return true; }
50 
66  void RetryRequestSleep(std::chrono::milliseconds sleepTime);
67 
69 
70  private:
71 
72  std::atomic< bool > m_disableRequestProcessing;
73 
74  std::mutex m_requestProcessingSignalLock;
75  std::condition_variable m_requestProcessingSignal;
76  };
77 
78  } // namespace Http
79 } // namespace Aws
80 
81 
Aws::Http::HttpClient::MakeRequest
virtual std::shared_ptr< HttpResponse > MakeRequest(const std::shared_ptr< HttpRequest > &request, Aws::Utils::RateLimits::RateLimiterInterface *readLimiter=nullptr, Aws::Utils::RateLimits::RateLimiterInterface *writeLimiter=nullptr) const =0
Aws::Http::HttpClient::IsRequestProcessingEnabled
bool IsRequestProcessingEnabled() const
AWS_CORE_API
#define AWS_CORE_API
Definition: Core_EXPORTS.h:25
Aws::Http::HttpRequest
Definition: HttpRequest.h:73
Aws::Http::HttpClient::EnableRequestProcessing
void EnableRequestProcessing()
Aws::Http::HttpClient::RetryRequestSleep
void RetryRequestSleep(std::chrono::milliseconds sleepTime)
Aws::Http::HttpClient::ContinueRequest
bool ContinueRequest(const Aws::Http::HttpRequest &) const
Aws::Http::HttpClient::HttpClient
HttpClient()
Aws::Http::HttpClient::~HttpClient
virtual ~HttpClient()
Definition: HttpClient.h:37
Aws::Http::HttpClient::SupportsChunkedTransferEncoding
virtual bool SupportsChunkedTransferEncoding() const
Definition: HttpClient.h:49
Aws::Http::HttpClient
Definition: HttpClient.h:34
Core_EXPORTS.h
Aws
Definition: AccessManagementClient.h:15
Aws::Utils::RateLimits::RateLimiterInterface
Definition: RateLimiterInterface.h:24
Aws::Http::HttpClient::DisableRequestProcessing
void DisableRequestProcessing()