Interface Context
-
- All Superinterfaces:
java.util.Map
- All Known Implementing Classes:
ContextBase,PortletWebContext,ServletWebContext,WebContext
public interface Context extends java.util.MapA
Contextrepresents the state information that is accessed and manipulated by the execution of aCommandor aChain. Specialized implementations ofContextwill typically add JavaBeans properties that contain typesafe accessors to information that is relevant to a particular use case for this context, and/or add operations that affect the state information that is saved in the context.Implementations of
Contextmust also implement all of the required and optional contracts of thejava.util.Mapinterface.It is strongly recommended, but not required, that JavaBeans properties added to a particular
Contextimplementation exhibit Attribute-Property Transparency. In other words, a value stored via a call tosetFoo(value)should be visible by callingget("foo"), and a value stored via a call toput("foo", value)should be visible by callinggetFoo(). If yourContextimplementation class exhibits this featue, it becomes easier to reuse the implementation in multiple environments, without the need to cast to a particular implementation class in order to access the property getter and setter methods.To protect applications from evolution of this interface, specialized implementations of
Contextshould generally be created by extending the provided base class (ContextBase) rather than directly implementing this interface.Applications should NOT assume that
Contextimplementations, or the values stored in its attributes, may be accessed from multiple threads simultaneously unless this is explicitly documented for a particular implementation.- Version:
- $Revision: 480477 $ $Date: 2006-11-29 08:34:52 +0000 (Wed, 29 Nov 2006) $
- Author:
- Craig R. McClanahan