org.apache.commons.chain.web
Class WebContext

java.lang.Object
  extended by java.util.AbstractMap<K,V>
      extended by java.util.HashMap
          extended by org.apache.commons.chain.impl.ContextBase
              extended by org.apache.commons.chain.web.WebContext
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable, java.util.Map, Context
Direct Known Subclasses:
FacesWebContext, PortletWebContext, ServletWebContext

public abstract class WebContext
extends ContextBase

Abstract base implementation of Context that provides web based applications that use it a "generic" view of HTTP related requests and responses, without tying the application to a particular underlying Java API (such as servlets). It is expected that a concrete subclass of WebContext for each API (such as ServletWebContext) will support adapting that particular API's implementation of request and response objects into this generic framework.

The characteristics of a web request/response are made visible via a series of JavaBeans properties (and mapped to read-only attributes of the same name, as supported by ContextBase.

Version:
$Revision: 1.6 $ $Date: 2004/11/30 05:52:23 $
Author:
Craig R. McClanahan
See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from interface java.util.Map
java.util.Map.Entry<K,V>
 
Constructor Summary
WebContext()
           
 
Method Summary
abstract  java.util.Map getApplicationScope()
          Return a mutable Map that maps application scope attribute names to their values.
abstract  java.util.Map getHeader()
          Return an immutable Map that maps header names to the first (or only) header value (as a String).
abstract  java.util.Map getHeaderValues()
          Return an immutable Map that maps header names to the set of all values specified in the request (as a String array).
abstract  java.util.Map getInitParam()
          Return an immutable Map that maps context application initialization parameters to their values.
abstract  java.util.Map getParam()
          Return an immutable Map that maps request parameter names to the first (or only) value (as a String).
abstract  java.util.Map getParamValues()
          Return an immutable Map that maps request parameter names to the set of all values (as a String array).
abstract  java.util.Map getRequestScope()
          Return a mutable Map that maps request scope attribute names to their values.
abstract  java.util.Map getSessionScope()
          Return a mutable Map that maps session scope attribute names to their values.
 
Methods inherited from class org.apache.commons.chain.impl.ContextBase
clear, containsValue, entrySet, get, isEmpty, keySet, put, putAll, remove, values
 
Methods inherited from class java.util.HashMap
clone, containsKey, size
 
Methods inherited from class java.util.AbstractMap
equals, hashCode, toString
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.util.Map
containsKey, equals, hashCode, size
 

Constructor Detail

WebContext

public WebContext()
Method Detail

getApplicationScope

public abstract java.util.Map getApplicationScope()

Return a mutable Map that maps application scope attribute names to their values.


getHeader

public abstract java.util.Map getHeader()

Return an immutable Map that maps header names to the first (or only) header value (as a String). Header names must be matched in a case-insensitive manner.


getHeaderValues

public abstract java.util.Map getHeaderValues()

Return an immutable Map that maps header names to the set of all values specified in the request (as a String array). Header names must be matched in a case-insensitive manner.


getInitParam

public abstract java.util.Map getInitParam()

Return an immutable Map that maps context application initialization parameters to their values.


getParam

public abstract java.util.Map getParam()

Return an immutable Map that maps request parameter names to the first (or only) value (as a String).


getParamValues

public abstract java.util.Map getParamValues()

Return an immutable Map that maps request parameter names to the set of all values (as a String array).


getRequestScope

public abstract java.util.Map getRequestScope()

Return a mutable Map that maps request scope attribute names to their values.


getSessionScope

public abstract java.util.Map getSessionScope()

Return a mutable Map that maps session scope attribute names to their values.