| Class | Waves::Dispatchers::Base |
| In: |
lib/dispatchers/base.rb
|
| Parent: | Object |
Waves::Dispatchers::Base provides the basic request processing structure for a Rack application. It creates a Waves request, determines whether to enclose the request processing in a mutex benchmarks it, logs it, and handles redirects. Derived classes need only process the request within the safe method, which must take a Waves::Request and return a Waves::Response.
As with any Rack application, a Waves dispatcher must provide a call method that takes an env hash.
# File lib/dispatchers/base.rb, line 35
35: def call( env )
36: response = if Waves.synchronize? or Waves.debug?
37: Waves.synchronize { Waves.reload ; _call( env ) }
38: else
39: _call( env )
40: end
41: end