|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.iplanet.jato.RequestManager
A mechanism that provides threadsafe static access to the current request context. Note that although we provide this mechanism, we do not in general recommend its use. There are several reasons for taking this position.
First, making the request context available statically requires thread synchronization, thus introducing a potential performance issue if the request context is obtained frequently and/or by many threads. Note that once the caller has obtained the request context, there is no need for further thread synchronization. Therefore, we recommend that if this mechanism is used, callers cache the reference to the obtained request context for the life of the request.
Second, most objects already have non-static (and thus non-synchronized)
access to the request context. Managed objects like view beans and
models which implement the RequestParticipant
interface
have the request context already set to them. The request context is
thus available directly to model implementations as well as sub-views
via the View.getParentViewBean().getRequestContext()
method.
Method Summary | |
static javax.servlet.http.HttpServletRequest |
getRequest()
Return the request object contained in the current thread's request context |
static RequestContext |
getRequestContext()
Return the request context associate with the current thread |
static javax.servlet.http.HttpServletResponse |
getResponse()
Return the response object contained in the current thread's request context |
static javax.servlet.http.HttpSession |
getSession()
Return the HttpSession contained in the current thread's
request context |
protected static void |
setRequestContext(RequestContext context)
Registers the specified request context with the current thread. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
public static RequestContext getRequestContext()
protected static void setRequestContext(RequestContext context)
ApplicationServletBase
during initialization of a request.public static javax.servlet.http.HttpServletRequest getRequest()
public static javax.servlet.http.HttpServletResponse getResponse()
public static javax.servlet.http.HttpSession getSession()
HttpSession
contained in the current thread's
request context
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |