Class: RailsRunner
- Inherits:
-
Net::AJP13::Server
- Object
- Net::AJP13::Server
- RailsRunner
- Defined in:
- lib/ajp-rails/rails-runner.rb
Overview
AJP server that dispatches AJP requests into Rails.
Instance Method Summary collapse
-
#initialize(options) ⇒ RailsRunner
constructor
option
-
Hash which contains server-wide options.
-
#process_request(request) ⇒ Object
Dispatches
request
into Rails and returns Net::AJP13::Response object which contains the result of Rails processing.
Constructor Details
#initialize(options) ⇒ RailsRunner
option
-
Hash which contains server-wide options.
27 28 29 30 |
# File 'lib/ajp-rails/rails-runner.rb', line 27 def initialize() super(['BIND_IP'], ['AJP_PORT']) = end |
Instance Method Details
#process_request(request) ⇒ Object
Dispatches request
into Rails and returns Net::AJP13::Response object which contains the result of Rails processing.
request
-
Net::AJP13::Request object
36 37 38 39 40 41 |
# File 'lib/ajp-rails/rails-runner.rb', line 36 def process_request(request) logger.debug("processing #{request.path}") response = AjpRailsDispatcher.dispatch(request, AjpRailsRequest::DEFAULT_SESSION_OPTIONS, ) logger.debug("processed #{request.path}: #{response.code} #{response.message}") response end |