Interface Context
- All Known Implementing Classes:
ContextBase
,FacesWebContext
,FacesWebContext
,PortletWebContext
,ServletWebContext
,ServletWebContext
,WebContext
,WebContext
Context
represents the state information that is
accessed and manipulated by the execution of a Command
or a
Chain
. Specialized implementations of Context
will
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 Context
must also implement all of the
required and optional contracts of the java.util.Map
interface.
It is strongly recommended, but not required, that JavaBeans
properties added to a particular Context
implementation exhibit
Attribute-Property Transparency. In other words,
a value stored via a call to setFoo(value)
should be visible
by calling get("foo")
, and a value stored
via a call to put("foo", value)
should be
visible by calling getFoo()
. If your Context
implementation class exhibits this feature, 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 Context
should generally be created by extending
the provided base class (ContextBase
)
rather than directly implementing this interface.
Applications should NOT assume that
Context
implementations, 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$ $Date$
- Author:
- Craig R. McClanahan
-
Nested Class Summary
-
Method Summary
Methods inherited from interface java.util.Map
clear, compute, computeIfAbsent, computeIfPresent, containsKey, containsValue, entrySet, equals, forEach, get, getOrDefault, hashCode, isEmpty, keySet, merge, put, putAll, putIfAbsent, remove, remove, replace, replace, replaceAll, size, values