Page Speed Optimization Libraries  1.9.32.1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
admin_site.h
Go to the documentation of this file.
1 // Copyright 2013 Google Inc.
17 
18 #ifndef NET_INSTAWEB_SYSTEM_PUBLIC_ADMIN_SITE_H_
19 #define NET_INSTAWEB_SYSTEM_PUBLIC_ADMIN_SITE_H_
20 
22 #include "pagespeed/kernel/base/string_util.h"
23 
24 namespace net_instaweb {
25 
26 class AsyncFetch;
27 class CacheInterface;
28 class GoogleUrl;
29 class HTTPCache;
30 class MessageHandler;
31 class PropertyCache;
32 class QueryParams;
33 class RewriteOptions;
34 class ServerContext;
35 class StaticAssetManager;
36 class Statistics;
37 class SystemCachePath;
38 class SystemCaches;
39 class SystemRewriteOptions;
40 class Timer;
41 class Writer;
42 
44 class AdminSite {
45  public:
52  enum AdminSource { kPageSpeedAdmin, kStatistics, kOther };
53 
54  AdminSite(StaticAssetManager* static_asset_manager, Timer* timer,
55  MessageHandler* message_handler);
56 
57  ~AdminSite() {
58  }
59 
62  void ConsoleHandler(const SystemRewriteOptions& global_options,
63  const RewriteOptions& options, AdminSource source,
64  const QueryParams& query_params, AsyncFetch* fetch,
65  Statistics* statistics);
66 
68  void MessageHistoryHandler(const RewriteOptions& options,
69  AdminSource source, AsyncFetch* fetch);
70 
73  Writer* writer, SystemRewriteOptions* global_system_rewrite_options);
74 
78  void AdminPage(bool is_global, const GoogleUrl& stripped_gurl,
79  const QueryParams& query_params,
80  const RewriteOptions* options,
81  SystemCachePath* cache_path,
82  AsyncFetch* fetch, SystemCaches* system_caches,
83  CacheInterface* filesystem_metadata_cache,
84  HTTPCache* http_cache, CacheInterface* metadata_cache,
85  PropertyCache* page_property_cache,
86  ServerContext* server_context, Statistics* statistics,
87  Statistics* stats,
88  SystemRewriteOptions* global_system_rewrite_options,
89  const SystemRewriteOptions* spdy_config);
90 
96  void StatisticsPage(bool is_global, const QueryParams& query_params,
97  const RewriteOptions* options, AsyncFetch* fetch,
98  SystemCaches* system_caches,
99  CacheInterface* filesystem_metadata_cache,
100  HTTPCache* http_cache, CacheInterface* metadata_cache,
101  PropertyCache* page_property_cache,
102  ServerContext* server_context, Statistics* statistics,
103  Statistics* stats,
104  SystemRewriteOptions* global_system_rewrite_options,
105  const SystemRewriteOptions* spdy_config);
106 
108  void ConsoleJsonHandler(const QueryParams& params, AsyncFetch* fetch,
109  Statistics* statistics);
110 
122  void StatisticsHandler(const RewriteOptions& options, AdminSource source,
123  AsyncFetch* fetch, Statistics* stats);
124 
127  void StatisticsJsonHandler(AsyncFetch* fetch, Statistics* stats);
128 
131  void GraphsHandler(const RewriteOptions& options, AdminSource source,
132  const QueryParams& query_params, AsyncFetch* fetch,
133  Statistics* stats);;
134 
136  void PrintSpdyConfig(AdminSource source, AsyncFetch* fetch,
137  const SystemRewriteOptions* spdy_config);
138 
140  void PrintNormalConfig(AdminSource source, AsyncFetch* fetch,
141  SystemRewriteOptions* global_system_rewrite_options);
142 
145  void PrintCaches(bool is_global, AdminSource source,
146  const GoogleUrl& stripped_gurl,
147  const QueryParams& query_params,
148  const RewriteOptions* options,
149  SystemCachePath* cache_path,
150  AsyncFetch* fetch, SystemCaches* system_caches,
151  CacheInterface* filesystem_metadata_cache,
152  HTTPCache* http_cache, CacheInterface* metadata_cache,
153  PropertyCache* page_property_cache,
154  ServerContext* server_context);
155 
157  void PrintHistograms(AdminSource source, AsyncFetch* fetch,
158  Statistics* stats);
159 
160  void PurgeHandler(StringPiece url, SystemCachePath* cache_path,
161  AsyncFetch* fetch);
162 
164  MessageHandler* MessageHandlerForTesting() { return message_handler_; }
165 
166  private:
167  MessageHandler* message_handler_;
168  StaticAssetManager* static_asset_manager_;
169  Timer* timer_;
170  DISALLOW_COPY_AND_ASSIGN(AdminSite);
171 };
172 
173 }
174 
175 #endif
Definition: static_asset_manager.h:44
void ConsoleJsonHandler(const QueryParams &params, AsyncFetch *fetch, Statistics *statistics)
Returns JSON used by the PageSpeed Console JavaScript.
void StatisticsPage(bool is_global, const QueryParams &query_params, const RewriteOptions *options, AsyncFetch *fetch, SystemCaches *system_caches, CacheInterface *filesystem_metadata_cache, HTTPCache *http_cache, CacheInterface *metadata_cache, PropertyCache *page_property_cache, ServerContext *server_context, Statistics *statistics, Statistics *stats, SystemRewriteOptions *global_system_rewrite_options, const SystemRewriteOptions *spdy_config)
void PrintSpdyConfig(AdminSource source, AsyncFetch *fetch, const SystemRewriteOptions *spdy_config)
Print details fo the SPDY configuration.
void PrintCaches(bool is_global, AdminSource source, const GoogleUrl &stripped_gurl, const QueryParams &query_params, const RewriteOptions *options, SystemCachePath *cache_path, AsyncFetch *fetch, SystemCaches *system_caches, CacheInterface *filesystem_metadata_cache, HTTPCache *http_cache, CacheInterface *metadata_cache, PropertyCache *page_property_cache, ServerContext *server_context)
void AdminPage(bool is_global, const GoogleUrl &stripped_gurl, const QueryParams &query_params, const RewriteOptions *options, SystemCachePath *cache_path, AsyncFetch *fetch, SystemCaches *system_caches, CacheInterface *filesystem_metadata_cache, HTTPCache *http_cache, CacheInterface *metadata_cache, PropertyCache *page_property_cache, ServerContext *server_context, Statistics *statistics, Statistics *stats, SystemRewriteOptions *global_system_rewrite_options, const SystemRewriteOptions *spdy_config)
void PrintNormalConfig(AdminSource source, AsyncFetch *fetch, SystemRewriteOptions *global_system_rewrite_options)
Print details fo the non-SPDY configuration.
void MessageHistoryHandler(const RewriteOptions &options, AdminSource source, AsyncFetch *fetch)
Displays recent Info/Warning/Error messages.: public ServerContext.
MessageHandler * MessageHandlerForTesting()
Return the message handler for debugging use.
Definition: admin_site.h:164
void StatisticsGraphsHandler(Writer *writer, SystemRewriteOptions *global_system_rewrite_options)
Deprecated handler for graphs in the PSOL console.
void GraphsHandler(const RewriteOptions &options, AdminSource source, const QueryParams &query_params, AsyncFetch *fetch, Statistics *stats)
AdminSource
Definition: admin_site.h:52
Implements the /pagespeed_admin pages.
Definition: admin_site.h:44
void PrintHistograms(AdminSource source, AsyncFetch *fetch, Statistics *stats)
Print histograms showing the dynamics of server activity.
void ConsoleHandler(const SystemRewriteOptions &global_options, const RewriteOptions &options, AdminSource source, const QueryParams &query_params, AsyncFetch *fetch, Statistics *statistics)
void StatisticsHandler(const RewriteOptions &options, AdminSource source, AsyncFetch *fetch, Statistics *stats)
void StatisticsJsonHandler(AsyncFetch *fetch, Statistics *stats)