Page Speed Optimization Libraries  1.13.35.1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
rate_controlling_url_async_fetcher.h
Go to the documentation of this file.
1 /*
2  * Copyright 2012 Google Inc.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http:///www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 
18 
19 #ifndef NET_INSTAWEB_HTTP_PUBLIC_RATE_CONTROLLING_URL_ASYNC_FETCHER_H_
20 #define NET_INSTAWEB_HTTP_PUBLIC_RATE_CONTROLLING_URL_ASYNC_FETCHER_H_
21 
26 
27 namespace net_instaweb {
28 
29 class AsyncFetch;
30 class MessageHandler;
31 class RateController;
32 class Statistics;
33 class ThreadSystem;
34 
39  public:
44  int max_global_queue_size,
45  int per_host_outgoing_request_threshold,
46  int per_host_queued_request_threshold,
47  ThreadSystem* thread_system,
48  Statistics* statistics);
49 
51 
52  virtual bool SupportsHttps() const {
53  return base_fetcher_->SupportsHttps();
54  }
55 
56  virtual void Fetch(const GoogleString& url,
57  MessageHandler* message_handler,
58  AsyncFetch* fetch);
59 
60  virtual void ShutDown();
61 
62  private:
63  UrlAsyncFetcher* base_fetcher_;
64  scoped_ptr<RateController> rate_controller_;
65 
66 
67 };
68 
69 }
70 
71 #endif
RateControllingUrlAsyncFetcher(UrlAsyncFetcher *fetcher, int max_global_queue_size, int per_host_outgoing_request_threshold, int per_host_queued_request_threshold, ThreadSystem *thread_system, Statistics *statistics)
Base class for implementations of monitoring statistics.
Definition: statistics.h:342
Definition: scoped_ptr.h:30
std::string GoogleString
PAGESPEED_KERNEL_BASE_STRING_H_.
Definition: string.h:24
virtual bool SupportsHttps() const
Definition: rate_controlling_url_async_fetcher.h:52
Definition: async_fetch.h:53
Definition: thread_system.h:40
Definition: message_handler.h:39
Definition: rate_controlling_url_async_fetcher.h:38
virtual bool SupportsHttps() const
Definition: url_async_fetcher.h:54
virtual void Fetch(const GoogleString &url, MessageHandler *message_handler, AsyncFetch *fetch)
Definition: url_async_fetcher.h:33