Sun and Oracle Community Voices How to Buy Log In United States [Change] English

»  Spotlight Articles
»  Projects
»  Publications
»  People
»  Awards
»  Events
»  Downloads
»  Internships
»  Contrarian Minds
»  About Sun Labs
Brazil project: Package sunlabs.brazil.server

Package sunlabs.brazil.server

Generic http protocol stack, essential handlers and drivers.

See:           Description

Interface Summary
Handler The interface for writing HTTP handlers.
 

Class Summary
ChainHandler Allows multiple handlers to be invoked sequentially for a single HTTP request.
FileHandler Standard handler for fetching static files.
Main Sample main program for starting an http server.
MultiHostHandler The MultiHostHandler allows the user to handle a set of host names that are all running on the same IP address.
Request Represents an HTTP transaction.
Request.HttpOutputStream The HttpOutputStream provides the convenience method writeBytes for writing the byte representation of a string, without bringing in the overhead and the deprecated warnings associated with a java.io.DataOutputStream.
Request.RechainableProperties The RechainableProperties is similar to a standard Properties, except that the defaults can be changed at any time.
Server Yet another HTTP/1.1 server.
 

Package sunlabs.brazil.server Description

Generic http protocol stack, essential handlers and drivers.

This package consists of a small server side http protocol stack, designed to be embedded in other applications. The design points are:

Extremely small footprint
Unlike a traditional webserver, designed primarily for serving web documents, this protocol stack is bare-bones, providing only the essentials for manipulating http requests and responses. It supports HTTP/1.0, and the important features of HTTP/1.1.
Small, simple extension API.
The programming interface is designed for simplicity. There are few convenience methods provided, and consequently no bias toward any pre-conceived notions as to what http protocol stacks should be used for.

Classes that implement this API are called handlers, to distinguish them from the moral equivalent, but more complex servlets used by the Java Web Server.

Delegation based object model
Inheritance is used sparingly in favor of delegation. This alleviates the need for base or abstract classes to know what the application has in mind.

To ease the deployment and testing of applications that use the server, two additional capabilities are included: a simple driver (main) program, and a coupler of handler classes, so the protocol stack can be used out of the box to provide a simple file service.


Version 2.2, Generated 07/25/00
Copyright (c) 2000, Sun Microsystems.