Class: Mongrel::HttpHandler

### Home Classes Methods

### In Files

- lib/mongrel/handlers.rb

### Parent

Object

### Methods

- #process
- #request_begins
- #request_progress

### Files

- CHANGELOG
- COPYING
- LICENSE
- README
- Makefile

### Class/Module Index

Quicksearch

- Mongrel
- Mongrel::CGIWrapper
- Mongrel::Camping
- Mongrel::Camping::CampingHandler
- Mongrel::Command
- Mongrel::Command::Base
- Mongrel::Command::Registry
- Mongrel::Configurator
- Mongrel::Const
- Mongrel::DeflateFilter
- Mongrel::DirHandler
- Mongrel::Error404Handler
- Mongrel::Gems
- Mongrel::HeaderOut
- Mongrel::HttpHandler
- Mongrel::HttpHandlerPlugin
- Mongrel::HttpParams
- Mongrel::HttpParser
- Mongrel::HttpParserError
- Mongrel::HttpRequest
- Mongrel::HttpResponse
- Mongrel::HttpServer
- Mongrel::Rails
- Mongrel::Rails::RailsConfigurator
- Mongrel::Rails::RailsHandler
- Mongrel::RedirectHandler
- Mongrel::StatisticsFilter
- Mongrel::Stats
- Mongrel::StatusHandler
- Mongrel::StopServer
- Mongrel::TimeoutError
- Mongrel::URIClassifier
- Mongrel::URIClassifier::RegistrationError
- Mongrel::URIClassifier::UsageError
- RequestLog
- RequestLog::Access
- RequestLog::Files
- RequestLog::Objects
- RequestLog::Params
- RequestLog::Threads
- IO
- Kernel
- MongrelDbg
- TCPServer

No matching classes.

# Mongrel::HttpHandler

You implement your application handler with this. It's very light giving just the minimum necessary for you to handle a request and shoot back a response. Look at the HttpRequest and HttpResponse objects for how to use them.

This is used for very simple handlers that don't require much to operate. More extensive plugins or those you intend to distribute as GemPlugins should be implemented using the HttpHandlerPlugin mixin.

### Attributes

listener[RW]
request_notify[R]

### Public Instance Methods

process(request, response) click to toggle source

    # File lib/mongrel/handlers.rb, line 39
    def process(request, response)
    end

request_begins(params) click to toggle source

This will be called by Mongrel if HttpHandler.request_notify set to true. You only get the parameters for the request, with the idea that you'd "bound" the beginning of the request processing and the first call to process.

    # File lib/mongrel/handlers.rb, line 29
    def request_begins(params)
    end

request_progress(params, clen, total) click to toggle source

Called by Mongrel for each IO chunk that is received on the request socket from the client, allowing you to track the progress of the IO and monitor the input. This will be called by Mongrel only if HttpHandler.request_notify set to true.

    # File lib/mongrel/handlers.rb, line 36
    def request_progress(params, clen, total)
    end

[Validate]

Generated with the Darkfish Rdoc Generator 2.