Package one.net.http

This package implements a HTTP server using the various one.world supplied features and primitives.

See:
          Description

Interface Summary
HttpMethod This interface allows the Responder component to implement HTTP methods that are not supported by default in the HttpServer component.
 

Class Summary
BindingCache Cache for tuple store bindings.
BindingCache.Entry Entry in the binding cache.
Cache Implementation of LRU approximation cache mechanism.
ChunkRequest Representation of a chunk request.
ChunkResponder Handler for taking care of chunk responses.
ChunkResponse Representation of a chunk response.
ChunkSequence Maintains a sequence of chunks.
DateFormatter Utility class to format dates.
EnvironmentHandler Environment Handler.
HtmlError Encapsulates the generation of HTML error pages.
HttpCapability Encapsulates information about the capability of the Responder.
HttpConnection Support class for HTTPServer that handles connection with HTTP client.
HttpConstants HttpConstants defines basic HTTP names and all HTTP/1.1 protocol entity names.
HttpEvent Implementation of a HTTP event.
HttpGetResponder Handler for taking care of HTTP GET responses.
HttpLog Various logging utility functions used by one.net.http
HttpRequest Representation of a HTTP request.
HttpResponse Representation of a HTTP response.
HttpServer HttpServer handles the parsing of HTTP requests as well as various connection management.
HttpURI HttpURI provides functionality for constructing and analyzing URIs for the HTTP protocol.
InternetDate InternetDate parses and unparses date and time specifiations.
LogEvent The LogEvent is sent to Logger which will write these to the tuple store as log entries.
Logger Uses an environment's tuple store as the backend for storing log entries.
MimeURLEncoded MimeURLEncoded implements encoders and decoders for the "application/x-www-form-urlencoded" MIME type.
Ordering Help implements ordering of HTTP requests.
Pair Represents a HTTP request/response pair.
PostMethod Implementation of the HTTP post method.
ProxyHandler  
RequestValidator Various utility functions to validate HTTP requests.
Responder Responder works as the backend for the HttpServer component.
ResponderInfo Information about the responder.
TupleCache Cache for tuples.
TupleCache.Entry Entry in the tuple cache.
TupleStoreProxy Simplifies the management of the one.world TupleStore from the HTTP server code.
TupleStoreProxy.Closure Closure for clients of this class.
 

Exception Summary
ChunkSequence.NoMoreChunksException Signals that all chunks have been read.
ParseException A ParseException describes an exceptional condition of a parsing entity.
 

Package one.net.http Description

This package implements a HTTP server using the various one.world supplied features and primitives.

To use the HTTP server, we need to do the following.

  1. Create environment for HTTP server
  2. Create child environment for storing documents (document root)
  3. Import documents into document root.
  4. Create child environment for storing logs
  5. Run server

E.g. In the shell, we would do the following,

  1. > mk http one.net.http.Responder [args]
  2. > cd http
  3. > mk logs
  4. > mk htdocs
  5. > cd htdocs
  6. > import docs/one (need permissions to do this)
  7. > cd ..
  8. > run http

[args] that can be supplied:

debug flag - true/false (default: false)
If true, log entries are dumped to the console.
level - 1,2,3 (default: 0)
If debug is true, only log entries above this level are dumped to the console.
port (default: 80)
The port to listen for HTTP connections on.
docroot (default: htdocs)
The child environment in which documents are stored.
logRoot (default: logs)
The child environment in which logs are stored.



(C) Copyright 2001 UW CSE