sunlabs.brazil.handler |
|
Java Source File Name | Type | Comment |
AclSwitchHandler.java | Class | Simple access control hander based on url prefixes or regexps.
Looks up list of valid prefixes or regular expressions in
sunlabs.brazil.server.Request.props , and allows/denies
access based on those prefixes. |
BasicAuthHandler.java | Class | The BasicAuthHandler obtains a Session ID by performing
"basic" authentication, using either the "Authorization" or the
"Proxy-Authorization" headers. |
CgiHandler.java | Class | Handler for implementing cgi/1.1 interface.
This implementation allows either suffix matching (e.g. |
ChainSawHandler.java | Class | Variant of the chain handler for doing standard logging.
Don't use on fine furniture.
Output is a variant of the common logfile format.
The common logfile format is as follows:
remotehost rfc931 authuser [date] "request" status bytes
- remotehost
- Remote hostname (or IP number if DNS hostname is not available, or if DNSLookup is Off.
|
ChownHandler.java | Class | Handler for changing the group and owner of the server. |
ConfigFileHandler.java | Class | Handler for manipulating per-user session state that can be
represented as ASCII name/value pairs. |
CookieSessionHandler.java | Class | Handler for creating browser sessions using cookies.
This handler provides a single cookie-id that may be used by
other handlers.
The intent is to require only one cookie per server.
(See also
sunlabs.brazil.filter.SessionFilter , which
manages sessions with or without cookies).
The following server properties are used:
- prefix
- url prefix
- cookie
- the name of the cookie to use (defaults to "cookie").
-
map
- If specified, the
ident argument to
SessionManager.getSession to get the table of valid
cookies, used to map the cookie value to a Session ID. |
DefaultFileHandler.java | Class | Handler for appending a url ending with '/' into the appropriate
url based on a default file in the file system.
The following request properties are used:
- defaults
- The names of the default files to search for in
the directory implied by the URL.
The first one that exists will
cause its name to be appended to the URL.
|
DeferredHandler.java | Class | Wrap another handler, deferring its initialization until request time.
This allows handlers to be configured, but not initialized until
a first use is attempted.
Normally, when a handler's class is first resolved, if any of the
dependent classes are not available, an error will occur, terminating the
server. |
DialogHandler.java | Class | Sample handler for popping up a dialog box on the server. |
DirectoryHandler.java | Class | Handler for directory lists.
This is a bare-bones handler for providing directory listings
for web servers.
It is designed to be placed after the
sunlabs.brazil.server.FileHandler . |
DynamicConfigHandler.java | Class | The DynamicConfigHandler allows the user to change the
configuration of the server and its handlers on the fly. |
GenericProxyHandler.java | Class | Handler for implementing a virtual web site. |
HomeDirHandler.java | Class | Handler for converting ~username queries. |
HtmlRewriter.java | Class | This class helps with parsing and rewriting an HTML document. |
LogHandler.java | Class | Handler for logging information about requests.
Wraps another handler, and logs information
about each HTTP request to a file.
Request properties:
- handler
- The name of the handler to wrap.
|
MapPage.java | Class | Utility class to rewrite links inside of web pages so they appear to
come from a different site. |
MultiProxyHandler.java | Class | Handler for permitting multiple cross connected virtual web sites.
Each handler instance adds its prefix and destination to a
static hashtable so the URL rewrite rules rewrite all of them correctly.
The
GenericProxyHandler rewrites all of the links in each wepage to point back to the local.
machine. |
NotFoundHandler.java | Class | Handler for returning "file not found" errors back to the client.
Look for the file "NotFound.html" in the current directory, and return it
if it exists. |
PollHandler.java | Class | Handler for periodically polling another web site, whose
results are (optionally) added to the server's properties.
THis also includes the ability to request URL's on a cron-like schedule.
The result of fetching the url is expected to be a text document in
java Properties format. |
PropertiesHandler.java | Class | Handler for returning selected request properties as a text/plain document
in java properties format. |
ProxyPropertiesHandler.java | Class | Obtain properties format content from remote websites, and
add it to the current request properties.
Many of the handlers
are designed to produce side effects, by inserting values into the
request properties (see
PropertiesHandler ).
If they are instead configured to produce the properties
in java properties format, then this handler
will read their output, and place the result in the request object on
their behalf. |
PublishHandler.java | Class | Handler for supporting publishing from Communicator.
Launches an authentication handler to protect the content
from malicious users.
Looks for PUT requests, and creates or modifies the
content as indicated.
The following request properties are used:
- prefix
- The URL prefix required for all documents
- session
- The the name of request property holding the session
information to provide the credentials for posting.
|
PushHandler.java | Class | Skeleton Handler for uploading files using multipart/form-data. |
ReflectHandler.java | Class | Handler for reflecting query data back to the client.
This is the example handler to demonstrate how a typical
handler is witten. |
ResourceHandler.java | Class | Handler for serving documents out of the jar file.
Look for url's as resources, presumably in the same "jar"
file as the class files.
This allows an entire web site to be included in the jar file.
A typical way to use this handler (with java 1.2+) is as follows:
|
RestrictClientHandler.java | Class | Simple access control hander based on source ip addresses. |
RolesHandler.java | Class | Handler for associating roles with an id. |
SMTPHandler.java | Class | Handler for Sending an email message via SMTP
The following server properties are used:
- prefix
- url prefix
- host
- The mail host (e.g.
|
SunNetAuthHandler.java | Class | All-in-one Handler for doing supplier.net style authentication.
The purpose of this handler is to provide an authenticated "front end"
to one or more web sites, using (hopefully) arbitrary challenge-
response based authentication via a plug-in authentication interface.
It can bridge disparate DNS domains by selectively mapping servers
on one domain into another, based on the supplied credentials, by using
the
MultiProxyHandler .
The authentication step is expected to yield a list of roles, each of
which represents permission to access a specific foreign site.
Once authentication is complete, and the roles are obtained,
the handler keeps a set of credentials (a lease)
on behalf of the user, which can be tuned at setup time for a variety
of expiration conditions. |
SupplyHandler.java | Class | Sample Handler for dispatching different users to different spots
This is a re-implementation of the supplier.net content server
using the new server apis (e.g. |
Token.java | Class | Manage supplier.net session tokens. |
UrlMapperHandler.java | Class | Handler for mapping or redirecting url's
Matches url's against a regexp pattern. |
VirtualHostHandler.java | Class | Handler for managing virtual hosts.
This prefixes the host name (from the host:) header onto the
url and passes the request along. |