copland.webrick

Various Copland services related to dealing with WEBrick servers and servlets.

Service Points

Configuration Points

Schemas

Service Points

DefaultHTTPServer (singleton)

A default HTTP server. This may configured via the DefaultHTTPServerConfiguration and DefaultServletList configuration points. This allows applications that only need a single WEBrick server to more easily set up that server. Applications that need multiple servers will need to define multiple service points themselves.

Implementor

HTTPServerFactory (singleton)

A service factory for creating new WEBrick HTTP servers.

Implementor

copland/webrick/http-server-factory/Copland::WEBrick::HTTPServerFactory

Schema

servlets [configuration] (required)
The configuration point containing the list of servlets that should be added to this server. The configuration should conform to the ServletList schema.
setup [configuration] (required)
The configuration point containing the setup information for the new server. The configuration should conform to the HTTPServerConfiguration schema.

WWWRPCServletFactory (singleton)

A service factory for creating new servlets that wrap existing services, and which export certain methods of those services for invocation via HTTP.

Implementor

Schema

interface [array] (required)
A list of methods exported by this service.
method [string] (required)
The name of the method on the service.
alias [string]
The name by which the method should be exported.
help [string]
Arbitrary text describing this method.
parameters [array]
The array of parameter names recognized by this interface, in the order in which they should be sent to the method.
service [service] (required)
The service to make available via the servlet.

Configuration Points

DefaultHTTPServerConfiguration (map)

This is the default point for configurating a WEBrick server. Applications may define their own configuration points and reuse the schema this point defines.

Schema

copland.webrick.HTTPServerConfiguration

DefaultServletList (list)

The list of servlets that should be added to a WEBrick server. This is the default configuration point. Applications may define their own and reuse the shema this point defines.

Schema

copland.webrick.ServletList

ResultHandlers (list)

This configuration point contains all of the result handler services that will be used by the ResultHandlers service to handle data returned by RPC services. Applications may define their own handler services and contribute them to this configuration point.

Schema

service [service] (required)
The service to contribute. It must implement at least one method, "handle", which should accept three parameters: the data to handle, the HTTP request object, and the HTTP response object.
after [array]
A list of handler names that this service should always be tried after.
before [array]
A list of handler names that this service should always be tried before.
name [string]
An optional name to assign this handler. This allows the handler to be referenced in other handlers' before and after lists.

Schemas

HTTPServerConfiguration

server.port [integer] (required)
the port that the server should listen to.
directory.index [array]
the list of index files in the order that they should be attempted.
directory.indexing.fancy [boolean]
whether or not to use fancy indexing.
document.root [string]
the document root of the server.
max.clients [integer]
the maximum number of concurrent connections.
request.timeout [integer]
seconds until a request times out.
server.auto.start [boolean]
whether or not the server will start as soon as the service is instantiated.
server.bind.address [string]
the address that the server should bind to.
server.name [string]
the name of the server.
ssl.cert.comment [string]
The comment to associate with the auto-generated certificate.
ssl.cert.name [array]
the name of the certificate (2D array)
ssl.enable [boolean]
whether or not to enable SSL on this server.

ServletList

This schema defines the format of a list of servlet mappings for a WEBrick server.

mount [string] (required)
the mount point of the servlet.
class [string]
the class to use as a servlet.
options [array]
Optional configuration data for the mount point.
service [service]
The servlet factory service to use to obtain a servlet instance.
Generated by Copland's Packrat documentation extractor on Mon Oct 11 20:22:31 MDT 2004