SUMMARY: CONSTR | METHOD DETAIL: CONSTR | METHOD

Class HTTP::Daemon::Threaded

Inherits from:
Thread::Apartment

Apartment threaded web server. Creates and maintains a pool of WebClient apartment threaded objects. Permits application specific content and session handler objects.

Copyright© 2006, Dean Arnold, Presicient Corp., USA
All rights reserved.

Licensed under the Academic Free License version 2.1, as specified in the License.txt file included in this software package, or at OpenSource.org.

Author:
D. Arnold
Version:
0.90
Since:
2006-08-21
See Also:
HTTP::Daemon::Threaded::Session

Unless otherwise noted, $self is the object instance variable.

Constructor Summary
new(AptTimeout => value, Port => value, MaxClients => value, LogLevel => value, EventLogger => value, WebLogger => value, Handlers => value, UserAuth => value, SessionCache => value, InactivityTimer => value, ContentParams => value, DocRoot => value, ProductTokens => value, MediaTypes => value)
          Provides facade for Thread::Apartment::new, to create a TAS for HTTP::Daemon::Threaded::Listener

Method Summary
setTimeout($timeout)
          (class method) Set TQD timeout

Constructor Details

new

new(AptTimeout => value, Port => value, MaxClients => value, LogLevel => value, EventLogger => value, WebLogger => value, Handlers => value, UserAuth => value, SessionCache => value, InactivityTimer => value, ContentParams => value, DocRoot => value, ProductTokens => value, MediaTypes => value)

Provides facade for Thread::Apartment::new, to create a TAS for HTTP::Daemon::Threaded::Listener. Allocates or creates a thread, and installs a Listener in it.

Note that the following parameters are recognized by HTTP::Daemon::Threaded, HTTP::Daemon::Threaded::Listener, and/or HTTP::Daemon::Threaded::WebClient, but applications may supply additional parameter key/value pairs which will be provided to the constructor for any specified HTTP::Daemon::Threaded::ContentParams class.

Parameters:
AptTimeout => (optional) Thread::Apartment proxy return timeout
Port => (optional) TCP listen port; default 80.
MaxClients => (optional) max number of client handlers to spawn; default 5
LogLevel => (optional) logging level; 1 => errors only; 2 => errors and warnings only; 3 => errors, warnings, and info messages; default 1
EventLogger => (optional) Instance of a HTTP::Daemon::Threaded::Logger to receive event notifications (except for web requests)
WebLogger => (optional) Instance of a HTTP::Daemon::Threaded::Logger to receive web request notifications
Handlers => (required) URI handler map; arrayref mapping URI regex's to handler package names
UserAuth => (optional) instance of a subclass of HTTP::Daemon::Threaded::Auth (not yet supported)
SessionCache => (optional) instance of a subclass of HTTP::Daemon::Threaded::SessionCache to be used to create/manage sessions
InactivityTimer => (optional) number of seconds a WebClient waits before disconnecting an idle connection; default 10 minutes
ContentParams => (optional) name of concrete implementation of HTTP::Daemon::Threaded::ContentParams
DocRoot => (optional) root directory for default file based content handler
ProductTokens => (optional) product token string to return to client; default is 'HTTP::Daemon::Threaded/'
MediaTypes => (optional) hashref mapping 'Content-Type' specifications to file qualifier strings. Values may be either a single string literal, or an arrayref of string literals, e.g.,
MediaTypes => { 'text/css' => 'css' }. Used to add media types for LWP::MediaTypes::guess_media_type()
Returns:
TAC proxy for HTTP::Daemon::Threaded::Listener object
See Also:
LWP::MediaTypes

Method Details

setTimeout

setTimeout($timeout)

(class method) Set TQD timeout.

Parameters:
$timeout - TQD timeout in seconds
Returns:
none

Generated by psichedoc on Mon Aug 28 09:45:39 2006