Jetty has moved!
Jetty is a project at the Eclipse Foundation.
Homepage:http://www.eclipse.org/jetty
Downloads: http://download.eclipse.org/jetty/
Documentation:http://www.eclipse.org/jetty/documentation/current/
About:http://www.eclipse.org/jetty/about.php
Jetty Powered:http://www.eclipse.org/jetty/powered/
Contact the core Jetty developers at www.webtide.com
private support for your internal/customer projects ... custom extensions and distributions ... versioned snapshots for indefinite support ... scalability guidance for your apps and Ajax/Comet projects ... development services from 1 day to full product delivery
Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 13 Next »

Jetty 6 Architecture

View from 20,000 feet

The Jetty Server is the plumbing between a collection of Connectors that accept HTTP connections, and a collection of Handlers that service requests from the connections and produce responses, with the work being done by threads taken from a thread pool.

While the jetty request/responses are derived from the Servlet API, the full features of the servlet API are only available if the appropriate handlers are configured. For example, the session API on the request is inactive unless the request has been passed to a Session Handler. The concept of a Servlet itself is represented by a Servlet Handler.

Thus a Jetty server may be built using simply connectors and handlers, but without using Servlets.

Contexts are handlers that group other handlers below a particular URI context path or a virtual host. Contexts may use the base ContextHandler, the servlet Context or a Web Application Context. A web application context combines handlers for security, session and servlets in a single unit that can be configured with a web.xml descriptor.

Patterns

The implementation of Jetty follows some fairly standard patterns. Most abstract concepts such as Connector, Handler and Buffer are captured by interfaces. Generic handling for those interfaces is then provided in an Abstract implementation such as AbstractConnector, AbstractHandler and AbstractBuffer.

The JSR77 inspired life cycle of most jetty components is represented by LifeCycle interface and the AbstractLifeCycle implementation used as the base of many Jetty components.

Jetty provides is own IO Buffering abstract over String, byte arrays and NIO buffers. This allows for greater portability of Jetty as well as hiding some of the complexity of the NIO layer and it's advanced features.

Connectors

Icon

This diagram is a little out of date, as a Connection interface has been extracted out of HttpConnector to allow support for the AJP protocol

The connectors represent the protocol handlers that accept connections, parse requests and generate responses. The different types of connectors available are based on the protocols , scheduling model and IO APIs used:

Handlers

Servlets

Web Applications

  • No labels
Contact the core Jetty developers at www.webtide.com
private support for your internal/customer projects ... custom extensions and distributions ... versioned snapshots for indefinite support ... scalability guidance for your apps and Ajax/Comet projects ... development services from 1 day to full product delivery