Library
Apache Jakarta Commons Chain version 1.0
A popular technique for organizing the execution of complex processing flows is the "Chain of Responsibility" pattern, as described (among many other places) in the classic "Gang of Four" design patterns book. Although the fundamental API contracts required to implement this design patten are extremely simple, it is useful to have a base API that facilitates using the pattern, and (more importantly) encouraging composition of command implementations from multiple diverse sources. Towards that end, the Chain API models a computation as a series of "commands" that can be combined into a "chain". The API for a command consists of a single method (execute()), which is passed a "context" parameter containing the dynamic state of the computation, and whose return value is a boolean that determines whether or not processing for the current chain has been completed (true), or whether processing should be delegated to the next command in the chain (false).
Statistics
Packages
Comments
Books
Packages
NameDescription
org.apache.commons.chain

The fundamental API contracts for the Chain of Responsibilty Pattern as implemented in this package.

org.apache.commons.chain.config

Optional package for configuring command chains in a catalog (using Digester) from an XML configuration file.

org.apache.commons.chain.generic

Concrete implementations of generic Commands that are useful in many different environments, not tied to a particular tier such as Servlets).

org.apache.commons.chain.impl

Convenient base implementations of Chain of Responsibility Pattern contracts from org.apache.commons.chain.

org.apache.commons.chain.web

Basis for specialized Context implementations suitable for use in web applications, and generic Command implementations useful across web application environments.

org.apache.commons.chain.web.faces

Specialized Context and Command implementations suitable for use in a JavaServer Faces API environment.

org.apache.commons.chain.web.portlet

Specialized Context and Command implementations suitable for use in a Portlet API environment.

org.apache.commons.chain.web.servlet

Specialized Context and Command implementations suitable for use in a Servlet API environment.

Search