Class WebContext

All Implemented Interfaces:
Serializable, Cloneable, Map<String,Object>, Context

public abstract class WebContext extends ContextBase
Extended 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 org.apache.commons.chain.web.javax.servlet.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$ $Date$
Author:
Craig R. McClanahan
See Also:
  • Constructor Details

    • WebContext

      public WebContext()
      The Default-Constructor for this class.
  • Method Details

    • getApplicationScope

      public abstract Map<String,Object> getApplicationScope()
      Return a mutable Map that maps application scope attribute names to their values.
      Returns:
      Application scope Map.
    • getHeader

      public abstract Map<String,String> 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.
      Returns:
      Header values Map.
    • getHeaderValues

      public abstract Map<String,String[]> 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.
      Returns:
      Header values Map.
    • getInitParam

      public abstract Map<String,String> getInitParam()
      Return an immutable Map that maps context application initialization parameters to their values.
      Returns:
      Initialization parameter Map.
    • getParam

      public abstract Map<String,String> getParam()
      Return an immutable Map that maps request parameter names to the first (or only) value (as a String).
      Returns:
      Request parameter Map.
    • getParamValues

      public abstract Map<String,String[]> getParamValues()
      Return an immutable Map that maps request parameter names to the set of all values (as a String array).
      Returns:
      Request parameter Map.
    • getCookies

      public abstract Map<String,Cookie> getCookies()
      Return an immutable Map that maps cookie names to the set of cookies specified in the request.
      Returns:
      Map of Cookies.
      Since:
      Chain 1.1
    • getRequestScope

      public abstract Map<String,Object> getRequestScope()
      Return a mutable Map that maps request scope attribute names to their values.
      Returns:
      Request scope Map.
    • getSessionScope

      public abstract Map<String,Object> getSessionScope()
      Return a mutable Map that maps session scope attribute names to their values.
      Returns:
      Session scope Map.