org.jwarp.service.web
Class WebContext

java.lang.Object
  |
  +--org.jwarp.service.web.WebContext
All Implemented Interfaces:
java.lang.Cloneable

public class WebContext
extends java.lang.Object
implements java.lang.Cloneable

This is an implementation of the WebContext interface. It has the ability to hook in commonly re-usable utilities via the configuraiton file for the Broker. These commonly re-usable utilities are then made available for use in the context. They include: Cookie, Form, FormList, and several others--see the WebMacro.properties file for the actual list, and a description of what's been loaded.

This class is made to be prototyped. You create a prototypical instance of the WebContext containing all the desired tools and a broker. You then use the newInstance(req,resp) method to create an instance of the WebContext to use versus a particular request.


Field Summary
(package private)  IMutableRequest _request
          The request for this http connect
(package private)  javax.servlet.http.HttpServletResponse _response
          The response for this http connect
(package private)  JWarpServlet owner
          The owning servlet reference.
static java.lang.String TICKET_ID
           
 
Constructor Summary
WebContext()
          Construct a new WebContext.
WebContext(JWarpServlet owner)
          Construct a new WebContext.
 
Method Summary
 void clear()
          Clear a WebContext of it's non-shared data
 java.lang.Object get(java.lang.String key)
           
 JWarpServlet getOwner()
           
 IMutableRequest getRequest()
          The HttpServletRequest object which contains information provided by the HttpServlet superclass about the Request.
 javax.servlet.http.HttpServletResponse getResponse()
          The HttpServletResponse object which contains information about the response we are going to send back.
 javax.servlet.http.HttpSession getSession()
          Returns the session
 java.lang.Object getTemp(java.lang.String key)
           
 ITicket getTicket()
           
 WebContext newInstance(IMutableRequest req, javax.servlet.http.HttpServletResponse resp)
          Create a new WebContext like this one, only with new values for request and response
 void put(java.lang.String key, java.lang.Object object)
           
 void putTemp(java.lang.String key, java.lang.Object object)
           
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

TICKET_ID

public static final java.lang.String TICKET_ID

_request

IMutableRequest _request
The request for this http connect

_response

javax.servlet.http.HttpServletResponse _response
The response for this http connect

owner

JWarpServlet owner
The owning servlet reference.
Constructor Detail

WebContext

public WebContext()
Construct a new WebContext.

WebContext

public WebContext(JWarpServlet owner)
Construct a new WebContext.
Method Detail

getOwner

public JWarpServlet getOwner()

newInstance

public final WebContext newInstance(IMutableRequest req,
                                    javax.servlet.http.HttpServletResponse resp)
Create a new WebContext like this one, only with new values for request and response

clear

public void clear()
Clear a WebContext of it's non-shared data

getSession

public javax.servlet.http.HttpSession getSession()
Returns the session

getRequest

public final IMutableRequest getRequest()
The HttpServletRequest object which contains information provided by the HttpServlet superclass about the Request. Much of this data is provided in other forms later on; those interfaces get their data from this object. In particular the form data has already been parsed.

See Also:
HttpServletRequest, org.webmacro.util.Property

getResponse

public final javax.servlet.http.HttpServletResponse getResponse()
The HttpServletResponse object which contains information about the response we are going to send back. Many of these services are provided through other interfaces here as well; they are built on top of this object.

See Also:
HttpServletResponse, org.webmacro.util.Property

getTicket

public ITicket getTicket()

put

public void put(java.lang.String key,
                java.lang.Object object)

putTemp

public void putTemp(java.lang.String key,
                    java.lang.Object object)

get

public java.lang.Object get(java.lang.String key)

getTemp

public java.lang.Object getTemp(java.lang.String key)

©   O R C A   S y s t e m s