001    /*
002     * Licensed to the Apache Software Foundation (ASF) under one or more
003     * contributor license agreements.  See the NOTICE file distributed with
004     * this work for additional information regarding copyright ownership.
005     * The ASF licenses this file to You under the Apache License, Version 2.0
006     * (the "License"); you may not use this file except in compliance with
007     * the License.  You may obtain a copy of the License at
008     *
009     *     http://www.apache.org/licenses/LICENSE-2.0
010     *
011     * Unless required by applicable law or agreed to in writing, software
012     * distributed under the License is distributed on an "AS IS" BASIS,
013     * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
014     * See the License for the specific language governing permissions and
015     * limitations under the License.
016     */
017    package org.apache.commons.chain;
018    
019    
020    import java.util.Map;
021    
022    
023    /**
024     * <p>A {@link Context} represents the state information that is
025     * accessed and manipulated by the execution of a {@link Command} or a
026     * {@link Chain}.  Specialized implementations of {@link Context} will
027     * typically add JavaBeans properties that contain typesafe accessors
028     * to information that is relevant to a particular use case for this
029     * context, and/or add operations that affect the state information
030     * that is saved in the context.</p>
031     *
032     * <p>Implementations of {@link Context} must also implement all of the
033     * required and optional contracts of the <code>java.util.Map</code>
034     * interface.</p>
035     *
036     * <p>It is strongly recommended, but not required, that JavaBeans
037     * properties added to a particular {@link Context} implementation exhibit
038     * <em>Attribute-Property Transparency</em>.  In other words,
039     * a value stored via a call to <code>setFoo(value)</code> should be visible
040     * by calling <code>get("foo")</code>, and a value stored
041     * via a call to <code>put("foo", value)</code> should be
042     * visible by calling <code>getFoo()</code>.  If your {@link Context}
043     * implementation class exhibits this featue, it becomes easier to reuse the
044     * implementation in multiple environments, without the need to cast to a
045     * particular implementation class in order to access the property getter
046     * and setter methods.</p>
047     *
048     * <p>To protect applications from evolution of this interface, specialized
049     * implementations of {@link Context} should generally be created by extending
050     * the provided base class ({@link org.apache.commons.chain.impl.ContextBase})
051     * rather than directly implementing this interface.</p>
052     *
053     * <p>Applications should <strong>NOT</strong> assume that
054     * {@link Context} implementations, or the values stored in its
055     * attributes, may be accessed from multiple threads
056     * simultaneously unless this is explicitly documented for a particular
057     * implementation.</p>
058     *
059     * @author Craig R. McClanahan
060     * @version $Revision: 480477 $ $Date: 2006-11-29 08:34:52 +0000 (Wed, 29 Nov 2006) $
061     */
062    
063    public interface Context extends Map {
064    
065    
066    }