Package org.apache.tomcat.core

Architecture

See:
          Description

Class Summary
BaseInterceptor Implement "Chain of Responsiblity" pattern ( == hooks ).
Container A group of resources, with some common properties.
Context Context represent a Web Application as specified by Servlet Specs.
ContextManager ContextManager controls requests processing and server configuration.
Handler The class that will generate the actual response or response fragment.
OutputBuffer The buffer used by tomcat response.
Request This is a low-level, efficient representation of a server request.
Response  
ServerSession Server representation of a Session.
 

Exception Summary
TomcatException General Tomcat exception
 

Package org.apache.tomcat.core Description

Architecture

Tomcat core defines a number of base abstractions ( Request, Response, Context, etc ) and a simple interface for modules.

All server functionality is implemented in modules, using callbacks in a model similar with Apache and other servers.

The ServletAPI and all specific contracts are implemented in special module(s) - that allows to keep the core simple and permits more flexibility.

The callbacks are defined in BaseInterceptor. A module will extend that class and possibly Handler if it wants to generate content. The module will use the information and API provided in Request, Response, Context, Container.

Components

ContextManager
Request,Response
Internal representations for HTTP request/response, including common attributes. Tuned for memory use ( recycling ) and performance, with minimal contracts.
Module base ( BaseInterceptor )
An interceptor defines callbacks ( or hooks ) that implement one or several server functions. Almost all of the processing logic is implemented as interceptor callbacks.
Handler
Content generator part of modules. Simple generators ( like error handlers), wrappers for Servlets or JSPs or complex chains/pipelines can be implemented. The handlers are defined as part of modules.
Context
Attributes shared by a web application, included local modules.
Container
Attributes shared by a group of URLs ( mappings, modules, authentication ). This is also the repository for modules used by ContextManager and Context ( which delegate to the "default" container ). The default container for the ContextManager stores attributes common to all URLs ( global modules, etc ), same for Context.
ServerSession
Server view of a session - independent of the actual implementation of the session manager. Modules implementing the session management callbacks may use a subclass and manage the sessions/
OutputBuffer
All content is stored in the OutputBuffer, which implement storage and conversion functions ( with a lot of tunning for performance and memory usage )

Dependencies

Indirect dependencies:

Sandboxing

Tomcat core and the associated utils can be sandboxed. In order to operate, it'll need the following permissions:

JDK support

Tomcat core and the utilities it depends on are JDK1.1 compatible.

Modules may require JDK1.2 or special APIs, but it is allways possible to use a more limited version that works on JDK1.1. Most modules that are distributed with tomcat are JDK1.1 compatible ( but they can take advantage of JDK1.2 features if detected ).

Notes

Modules may store various "notes" ( the name is from apache ). Notes are internal attributes, and can be accessed by name and by index ( to avoid hashtable lookups in the critical path ).

Notes are used for attribute-specific informations, and are a mechanism to share information between related modules.

The following notes are known defined:



Copyright © 2001 Apache Software Foundation. All Rights Reserved.