|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object atg.nucleus.logging.VariableArgumentApplicationLoggingImpl atg.nucleus.GenericService atg.nucleus.TimedOperationService atg.servlet.pipeline.PipelineableServletImpl atg.servlet.pipeline.SessionPipelineServlet
public class SessionPipelineServlet
This adds an attribute factory for the HttpSessionRequest object that contains session information about this request's session. The attribute is javax.servlet.http.HttpSessionRequest.
The first time this attribute is accessed, it will examine the request's URL arguments and cookies for a session id, and will then find or create the session. It will also send back a cookie in the case where a cookie is needed. Note that all of this happens only the first time the attribute is accessed, not necessarily at the time the request runs through this servlet. This servlet does nothing more than register an attribute factory. There is, however, a property called "accessSessionImmediately" that, if true, will cause the session to be accessed at the same time that the request passes through this servlet. If that flag is false, then the session access is delayed until the first access. By default, this flag is set to true.
The session request attribute should be accessed after the request has run through a URLArgumentPipelineServlet and a CookiePipelineServlet, and before any output is rendered (because it might need to send a cookie).
Note that if the attribute is never accessed, then the session will never be accessed or created, nor will a cookie be sent out. Remember that by default, this servlet will access the session as soon as the request runs through this servlet. You must turn accessSessionImmediately to false to delay access of the session.
Field Summary | |
---|---|
static java.lang.String |
CLASS_VERSION
Class version string |
Fields inherited from class atg.nucleus.GenericService |
---|
SERVICE_INFO_KEY |
Fields inherited from interface atg.nucleus.logging.TraceApplicationLogging |
---|
DEFAULT_LOG_TRACE_STATUS |
Fields inherited from interface atg.nucleus.logging.ApplicationLogging |
---|
DEFAULT_LOG_DEBUG_STATUS, DEFAULT_LOG_ERROR_STATUS, DEFAULT_LOG_INFO_STATUS, DEFAULT_LOG_WARNING_STATUS |
Constructor Summary | |
---|---|
SessionPipelineServlet()
Constructs a new SessionPipelineServlet |
Method Summary | |
---|---|
boolean |
getAccessSessionImmediately()
Returns the flag indicating if the session should be accessed immediately when the request runs through this pipeline element. |
java.lang.String |
getErrorURL()
Returns the errorURL property |
atg.servlet.sessiontracking.SessionManagerService |
getSessionManager()
Returns the SessionManager |
HttpSessionRequest |
getSessionRequest(DynamoHttpServletRequest pRequest,
DynamoHttpServletResponse pResponse)
Returns the SessionRequest |
boolean |
isAdminPipeline()
Returns flag determining whether this component is part of the admin pipeline or not. |
void |
service(DynamoHttpServletRequest pRequest,
DynamoHttpServletResponse pResponse)
Services a DynamoHttpServletRequest/Response pair |
void |
setAccessSessionImmediately(boolean pAccessSessionImmediately)
Sets the flag indicating if the session should be accessed immediately when the request runs through this pipeline element. |
void |
setAdminPipeline(boolean pIsAdminPipeline)
Set flag to denote whether this component is part of the admin pipeline or not. |
void |
setErrorURL(java.lang.String pErrorURL)
A URL to redirect the request to if the session limit has been exceeded |
void |
setSessionManager(atg.servlet.sessiontracking.SessionManagerService pSessionManager)
Sets the SessionManager |
Methods inherited from class atg.servlet.pipeline.PipelineableServletImpl |
---|
createAdminServlet, destroy, getAdminServlet, getNextServlet, getServletConfig, getServletInfo, init, isUsePathInfo, passRequest, passRequest, service, service, setNextServlet, setServletInfo, setUsePathInfo |
Methods inherited from class atg.nucleus.TimedOperationService |
---|
getAverageRequestHandlingTime, getHandledRequestCount, getRequestStartTime, getTotalRequestHandlingTime, isKeepingStatistics, notifyHandledRequest, resetStatistics, setKeepingStatistics |
Methods inherited from class atg.nucleus.logging.VariableArgumentApplicationLoggingImpl |
---|
vlogDebug, vlogDebug, vlogDebug, vlogDebug, vlogDebugTrace, vlogError, vlogError, vlogError, vlogError, vlogInfo, vlogInfo, vlogInfo, vlogInfo, vlogTrace, vlogTrace, vlogTrace, vlogTrace, vlogWarning, vlogWarning, vlogWarning, vlogWarning |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static java.lang.String CLASS_VERSION
Constructor Detail |
---|
public SessionPipelineServlet()
Method Detail |
---|
public HttpSessionRequest getSessionRequest(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse)
public atg.servlet.sessiontracking.SessionManagerService getSessionManager()
public void setSessionManager(atg.servlet.sessiontracking.SessionManagerService pSessionManager)
public boolean getAccessSessionImmediately()
public void setAccessSessionImmediately(boolean pAccessSessionImmediately)
public void setErrorURL(java.lang.String pErrorURL)
public java.lang.String getErrorURL()
public void setAdminPipeline(boolean pIsAdminPipeline)
pIsAdminPipeline
- true if part of admin pipeline.public boolean isAdminPipeline()
public void service(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse) throws java.io.IOException, javax.servlet.ServletException
service
in class PipelineableServletImpl
javax.servlet.ServletException
- if an error occurred while processing
the servlet request
java.io.IOException
- if an error occurred while reading or writing
the servlet request
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |