| 
 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface Context
A context is an object that can be passed between tiers of an application without exposing the APIs that are particular to any given tier. For example, in a web application the information submitted by a user in an HttpRequest object could be exposed to a business object through the Context interface. This leaves objects in the business tier independent of the servlet API and thus testable outside a Servlet container.
| Method Summary | |
|---|---|
|  java.lang.Object | get(java.lang.String propertyName)Retrieve the property named propertyName. | 
|  java.lang.String[] | getPropertyNames()Gets the names of the properties which are currently defined for this context. | 
|  void | set(java.lang.String propertyName,
    java.lang.Object propertyValue)Sets propertyNametopropertyValue. | 
| Method Detail | 
|---|
java.lang.String[] getPropertyNames()
                                    throws ContextException
Context#PROPERTY_NAMES_PROPERTY as
 one of the properties in the returned array.
ContextException - if the properties could not be retieved for some reason
java.lang.Object get(java.lang.String propertyName)
                     throws ContextException
propertyName. The property
 Context#PROPERTY_NAMES_PROPERTY has special symantics. Unless a
 value for this property has already been explicitly specified for the
 context, context.get(PROPERTY_NAMES_PROPERTY) will return
 the same result as getPropertyNames().
propertyName - the name of the property to be retrieved, if the property has
            been defined or null, if the property is not defined
ContextException - if propertyName is empty or 
void set(java.lang.String propertyName,
         java.lang.Object propertyValue)
         throws ContextException
propertyName to propertyValue.
propertyName - the name of the property to setpropertyValue - the new value for the property
ContextException - if propertyName is empty or | 
 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||