1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package org.apache.commons.chain;
17
18
19 import java.util.Map;
20
21
22 /***
23 * <p>A {@link Context} represents the state information that is
24 * accessed and manipulated by the execution of a {@link Command} or a
25 * {@link Chain}. Specialized implementations of {@link Context} will
26 * typically add JavaBeans properties that contain typesafe accessors
27 * to information that is relevant to a particular use case for this
28 * context, and/or add operations that affect the state information
29 * that is saved in the context.</p>
30 *
31 * <p>Implementations of {@link Context} must also implement all of the
32 * required and optional contracts of the <code>java.util.Map</code>
33 * interface.</p>
34 *
35 * <p>It is strongly recommended, but not required, that JavaBeans
36 * properties added to a particular {@link Context} implementation exhibit
37 * <em>Attribute-Property Transparency</em>. In other words,
38 * a value stored via a call to <code>setFoo(value)</code> should be visible
39 * by calling <code>get("foo")</code>, and a value stored
40 * via a call to <code>put("foo", value)</code> should be
41 * visible by calling <code>getFoo()</code>. If your {@link Context}
42 * implementation class exhibits this featue, it becomes easier to reuse the
43 * implementation in multiple environments, without the need to cast to a
44 * particular implementation class in order to access the property getter
45 * and setter methods.</p>
46 *
47 * <p>To protect applications from evolution of this interface, specialized
48 * implementations of {@link Context} should generally be created by extending
49 * the provided base class ({@link org.apache.commons.chain.impl.ContextBase})
50 * rather than directly implementing this interface.</p>
51 *
52 * <p>Applications should <strong>NOT</strong> assume that
53 * {@link Context} implementations, or the values stored in its
54 * attributes, may be accessed from multiple threads
55 * simultaneously unless this is explicitly documented for a particular
56 * implementation.</p>
57 *
58 * @author Craig R. McClanahan
59 * @version $Revision: 155403 $ $Date: 2005-02-26 12:52:46 +0000 (Sat, 26 Feb 2005) $
60 */
61
62 public interface Context extends Map {
63
64
65 }