/*
 * Created on 13-ene-2005
 *
 */
package es.dalocar.software;

import java.io.Serializable;
import java.util.Enumeration;

/**
 * @author Eduardo Millán
 *
 * Context interface. Used to store application data
 * 
 */
public interface Context extends Serializable {
    /**
     * Establishes an object inside this context
     * @param key object key
     * @param value object value
     */
    void setAttribute(String key, Object value);
    
    /**
     * Retrieves an object from this context
     * 
     * @param key object key
     * @return object value or null if the object cannot be found
     */
    Object getAttribute(String key);

    
    /**
     * Resets this context
     *
     */
    void clear();
    
    
    /**
     * Returns an Enumeration containing the attribute names available 
     * within this context.
     * @return Enumeration of attribute names
     */
    Enumeration getAttributeNames();
    
    
    /**
     * Removes the attribute with the given name from this context.
     * @param name the attribute name to be removed
     */
    void removeAttribute(String name);
    
}
