Class: Raw::Adapter
- Inherits:
-
Object
- Object
- Raw::Adapter
- Defined in:
- lib/raw/adapter.rb
Overview
The base Adapter class. All other adapters extend this class. An adapter conceptually connects Nitro with a Front Web Server. Please notice that many Adapters (for example Webrick and Mongrel implement an ‘inline’ Front Web Server).
The Adapter typically initializes a Handler to handle the http requests.
Direct Known Subclasses
Instance Method Summary collapse
-
#initialize ⇒ Adapter
constructor
Initialize the adapter.
-
#setup(app) ⇒ Object
Setup the adapter (used as a hook).
-
#start(app) ⇒ Object
Start the adapter.
-
#stop ⇒ Object
Stop the adapter.
Constructor Details
#initialize ⇒ Adapter
Initialize the adapter.
28 29 |
# File 'lib/raw/adapter.rb', line 28 def initialize end |
Instance Method Details
#setup(app) ⇒ Object
Setup the adapter (used as a hook).
33 34 |
# File 'lib/raw/adapter.rb', line 33 def setup(app) end |
#start(app) ⇒ Object
Start the adapter.
38 39 40 41 42 43 |
# File 'lib/raw/adapter.rb', line 38 def start(app) info "Starting #{self.class.name.demodulize.underscore.humanize} on #{app.address}:#{app.port}" info "Press Ctrl-C to shutdown; Run with --help for options." setup(app) end |
#stop ⇒ Object
Stop the adapter.
47 48 49 |
# File 'lib/raw/adapter.rb', line 47 def stop info "Stoping #{self.class.name.demodulize.underscore.humanize}." end |