SUMMARY: CONSTR | METHOD DETAIL: CONSTR | METHOD

Class DBDetour::HTTPD

Inherits from:
Thread::Apartment::IOServer
DBDetour::Logable

Web network listener: accepts network connections, and routes them to WebClient objects to handle the web requests. Creates and maintains a pool of WebClient objects.

Author:
D. Arnold
Version:
2005.1216
Since:
2005-12-01

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

Constructor Summary
new(AptTimeout => value, Mux => value, Logger => value, Config => value, EnableSelector => value, DisableSelector => value, Stats => value)

Method Summary
acceptConfig(SharedConsumers => value, BgPersons => value, Transports => value)
          Accept updated configuration information.
close()
          Closes the HTTPD listen socket and stops all the WebClient threads.
getSocket()
          Return the listener socket.
get_simplex_methods()
          Overrides Thread::Apartment::Server::get_simplex_methods() .
handleSocketError()
          Deprecated. 1
handleSocketEvent()
          Handle listen socket events.
poll()
          Thread::Apartment::IOServer::poll() implementation.
setLogLevel($level)
          Set log level.

Constructor Details

new

new(AptTimeout => value, Mux => value, Logger => value, Config => value, EnableSelector => value, DisableSelector => value, Stats => value)

Opens the HTTPD listener socket. Installs the socket in the global selectors in SP/ST/MX mode; else creates its own selector.

Parameters:
AptTimeout => Thread::Apartment proxy return timeout
Mux => main Mux
Logger => logger object
Config => HTTPD configuration info from config file
EnableSelector => IO::Selector for single threaded mode
DisableSelector => IO::Selector for single threaded mode
Stats => global shared stats
Returns:
DBDetour::HTTPD object

Method Details

acceptConfig

acceptConfig(SharedConsumers => value, BgPersons => value, Transports => value)

Accept updated configuration information. Called by the Mux after all the shared consumers, background personalities, and TransportFactories have been created. Starts the WebClient threads.

Parameters:
SharedConsumers => hashref mapping shared consumer names to objects
BgPersons => hashref mapping background personality names to objects
Transports => hashref mapping transport names to TransportFactory objects
Returns:
1

close

close()

Closes the HTTPD listen socket and stops all the WebClient threads.

Simplex
Returns:
1

getSocket

getSocket()

Return the listener socket.

Returns:
DBDetour::Socket listen socket object

get_simplex_methods

get_simplex_methods()

Overrides Thread::Apartment::Server::get_simplex_methods()

Returns:
hashref of simplex method names

handleSocketError

handleSocketError()

Handle socket errors.

Returns:
undef

handleSocketEvent

handleSocketEvent()

Handle listen socket events. Accepts a new connection request, allocates a WebClient to handle it, and passes the new socket to the WebClient

Returns:
1

poll

poll()

Thread::Apartment::IOServer::poll() implementation.

Returns:
1

setLogLevel

setLogLevel($level)

Set log level. Called from WebClient when loglevel update is requested.

Simplex
Parameters:
$level - new log level
Returns:
1

Generated by psichedoc on Fri Dec 16 12:55:39 2005