|
CoherenceTM v3.3 Copyright© 2000-2007 by Oracle Corporation |
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.tangosol.util.Base com.tangosol.coherence.servlet.RequestContext com.tangosol.coherence.servlet.HttpRequestContext
public class HttpRequestContext
Request context information for an HTTP Servlet request.
Field Summary | |
---|---|
protected static String |
KEY_SESSION_ID
The key used to store the current session ID in the map returned by saveRequestState . |
Fields inherited from class com.tangosol.coherence.servlet.RequestContext |
---|
KEY_REQUEST, KEY_RESPONSE, REQ_ATTR_CONTEXT, REQ_ATTR_DISPATCH, REQ_ATTR_OK_WRAP, REQ_ATTR_REQUEST, REQ_ATTR_WRAPPED |
Constructor Summary | |
---|---|
HttpRequestContext(SessionHelper helper,
RequestContext ctxOuter,
HttpServletRequest req,
String sSessionId,
boolean fCookie,
boolean fUrl)
Construct a HttpRequestContext object to hold the state of the request and response and the wrappers for each. |
Method Summary | |
---|---|
protected String |
getDescription()
Returns a string representation of this object's attributes. |
HttpServletRequest |
getHttpServletRequest()
Get the wrapped HttpServletRequest. |
HttpServletRequest |
getHttpServletRequestWrapper()
Get the HttpServletRequest wrapper. |
HttpServletResponse |
getHttpServletResponse()
Get the wrapped HttpServletResponse. |
HttpServletResponse |
getHttpServletResponseWrapper()
Get the HttpServletResponse wrapper. |
HttpRequestContext |
getOuterHttpRequestContext()
Determine the HttpRequestContext object that this HttpRequestContext exists "within", if this request context was created by a nested request, such as by including or forwarding. |
HttpSession |
getSession()
Returns the current session associated with the stack of request context objects, or if the session has not been associated yet with the stack of request context objects, returns null. |
String |
getSessionId()
Determine the HTTP session ID that came in with the request. |
boolean |
isRequestedSessionIdFromCookie()
Checks whether the requested session ID came in as a cookie. |
boolean |
isRequestedSessionIdFromURL()
Checks whether the requested session ID came in as part of the request URL. |
void |
restoreRequestState(Map mapState,
boolean fExternal)
Restores the underlying Servlet request back to the state it was in prior to calling saveRequestState . |
Map |
saveRequestState(boolean fExternal)
Returns a map containing the state of the underlying Servlet request. |
void |
setSession(HttpSession session)
Store the current session to be associated with the stack of request context objects, or if no session should be associated with the stack of request context objects. |
protected void |
setSessionId(String sSessionId)
Sets the ID of the session associated with the request. |
String |
toString()
Returns a string representation of the object. |
Methods inherited from class com.tangosol.coherence.servlet.RequestContext |
---|
decReferenceCount, getOuterRequestContext, getReferenceCount, getServletRequest, getServletRequestWrapper, getServletResponse, getServletResponseWrapper, getSessionHelper, incReferenceCount, isNested, setServletRequestWrapper, setServletResponse, setServletResponseWrapper |
Field Detail |
---|
protected static final String KEY_SESSION_ID
saveRequestState
.
Constructor Detail |
---|
public HttpRequestContext(SessionHelper helper, RequestContext ctxOuter, HttpServletRequest req, String sSessionId, boolean fCookie, boolean fUrl)
helper
- the SessionHelper for this applicationctxOuter
- the outer RequestContext object, or null if nonereq
- the application server's HttpServletRequest objectsSessionId
- the session id (if any) that came with the requestfCookie
- if the session id came from a cookiefUrl
- if the session id came from the urlMethod Detail |
---|
public Map saveRequestState(boolean fExternal)
restoreRequestState
with the
map returned from this method.
If the fExternal parameter is true, any outstanding session state
changes are flushed to the cluster and ownership of the session is
relinquished.
saveRequestState
in class RequestContext
fExternal
- true if the nested request will target an external web
application
public void restoreRequestState(Map mapState, boolean fExternal)
saveRequestState
.
If the fExternal parameter is true, ownership of the current
session (if any) is reestablished.
restoreRequestState
in class RequestContext
mapState
- the Map returned from a call to
saveRequestState
fExternal
- true if the nested request had targeted an external web
applicationpublic HttpRequestContext getOuterHttpRequestContext()
public HttpServletRequest getHttpServletRequest()
public HttpServletResponse getHttpServletResponse()
public HttpServletRequest getHttpServletRequestWrapper()
public HttpServletResponse getHttpServletResponseWrapper()
public String getSessionId()
protected void setSessionId(String sSessionId)
sSessionId
- the new session IDpublic boolean isRequestedSessionIdFromCookie()
true
if the session ID came in as a cookie;
otherwise, false
public boolean isRequestedSessionIdFromURL()
true
if the session ID came in as part of a URL;
otherwise, false
public HttpSession getSession()
public void setSession(HttpSession session)
session
- the HttpSession object to associated with the stack
of request context objectspublic String toString()
toString
in class RequestContext
protected String getDescription()
getDescription
in class RequestContext
|
CoherenceTM v3.3 Copyright© 2000-2007 by Oracle Corporation |
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |