Page Speed Optimization Libraries  1.13.35.1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
apache_rewrite_driver_factory.h
Go to the documentation of this file.
1 // Copyright 2010 Google Inc.
17 
18 #ifndef PAGESPEED_APACHE_APACHE_REWRITE_DRIVER_FACTORY_H_
19 #define PAGESPEED_APACHE_APACHE_REWRITE_DRIVER_FACTORY_H_
20 
30 
31 struct apr_pool_t;
32 struct server_rec;
33 
34 namespace net_instaweb {
35 
36 class ApacheMessageHandler;
37 class ApacheServerContext;
38 class MessageHandler;
39 class ProcessContext;
40 class ServerContext;
41 class SchedulerThread;
42 class SharedCircularBuffer;
43 class SlowWorker;
44 class Timer;
45 
48  public:
49  ApacheRewriteDriverFactory(const ProcessContext& process_context,
50  server_rec* server, const StringPiece& version);
51  virtual ~ApacheRewriteDriverFactory();
52 
58  return apache_message_handler_;
59  }
60 
62  InitStats(statistics);
63  }
64 
65  ApacheServerContext* MakeApacheServerContext(server_rec* server);
66 
71 
73 
77 
81  static void InitStats(Statistics* statistics);
82  static void Initialize();
83  static void Terminate();
84 
89 
91  virtual void set_message_buffer_size(int x) {
92  SystemRewriteDriverFactory::set_message_buffer_size(x);
93  }
94 
95  virtual bool IsServerThreaded();
96  virtual int LookupThreadLimit();
97 
98  protected:
101  virtual MessageHandler* DefaultMessageHandler();
102  virtual Timer* DefaultTimer();
103  virtual void SetupCaches(ServerContext* server_context);
104 
107  virtual bool ShouldWriteResourcesToFileSystem() { return false; }
108 
109  virtual void ParentOrChildInit();
110 
111  virtual void SetupMessageHandlers();
112  virtual void ShutDownMessageHandlers();
113 
114  virtual void SetCircularBuffer(SharedCircularBuffer* buffer);
115 
117 
118  private:
119 
120  apr_pool_t* pool_;
121  server_rec* server_rec_;
122  scoped_ptr<SlowWorker> slow_worker_;
123  SchedulerThread* scheduler_thread_;
124 
129  GoogleString version_;
130 
136  ApacheMessageHandler* apache_message_handler_;
141  ApacheMessageHandler* apache_html_parse_message_handler_;
142 
143 
144 };
145 
146 }
147 
148 #endif
virtual ApacheConfig * NewRewriteOptionsForQuery()
bool PoolDestroyed(ApacheServerContext *rm)
Definition: apache_config.h:31
virtual bool ShouldWriteResourcesToFileSystem()
Definition: apache_rewrite_driver_factory.h:107
Base class for implementations of monitoring statistics.
Definition: statistics.h:342
virtual void NonStaticInitStats(Statistics *statistics)
Definition: apache_rewrite_driver_factory.h:61
A server context with features specific to a psol port on a unix system.
Definition: system_rewrite_driver_factory.h:57
Definition: scoped_ptr.h:30
Definition: apache_server_context.h:52
std::string GoogleString
PAGESPEED_KERNEL_BASE_STRING_H_.
Definition: string.h:24
Definition: apache_message_handler.h:35
static void InitStats(Statistics *statistics)
Definition: scheduler_thread.h:35
virtual void set_message_buffer_size(int x)
Needed by mod_instaweb.cc:ParseDirective().
Definition: apache_rewrite_driver_factory.h:91
Definition: shared_circular_buffer.h:43
virtual ApacheConfig * NewRewriteOptions()
virtual ServerContext * NewDecodingServerContext()
Definition: server_context.h:99
Definition: process_context.h:35
virtual void SetupCaches(ServerContext *server_context)
Statistics * statistics()
Definition: rewrite_driver_factory.h:247
Definition: message_handler.h:39
Creates an Apache RewriteDriver.
Definition: apache_rewrite_driver_factory.h:47
ApacheMessageHandler * apache_message_handler()
Definition: apache_rewrite_driver_factory.h:57
virtual MessageHandler * DefaultHtmlParseMessageHandler()
Provide defaults.
Timer interface, made virtual so it can be mocked for tests.
Definition: timer.h:27