|
|||||||||
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.GenericContext atg.nucleus.RequestScopeManager
public class RequestScopeManager
A RequestScopeManager manages a set of hierarchies that are meant to hold "request-scoped" objects. Each hierarchy is associated with a key. One can ask for the hierarchy corresponding to a specified key, which will return or create the Context at the top of that hierarchy.
In normal use, a server will spin off a number of threads that will handle requests. Those threads will each have a request object which is used as the key for its request scope.
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 | |
---|---|
RequestScopeManager()
Constructs a new blank RequestScopeManager |
Method Summary | |
---|---|
boolean |
canReferenceOtherScope(atg.nucleus.ScopeManager pScopeManager)
|
void |
doStartService()
This is called after a Service has been created, placed into the naming hierarchy, and initialized with its configured property values. |
void |
doStopService()
This is called when a Service is required to shut down. |
int |
generateId()
Generates a new id and returns it. |
GenericContext |
getContext(java.lang.Object pKey)
Deprecated. |
GenericContext |
getContext(java.lang.Object pKey,
int pId)
Returns the GenericContext for the given Key and id |
Schedule |
getLostRequestScopeSchedule()
|
java.lang.String |
getManagedScopeName()
|
int |
getNumSavedRequestScopes()
Read-only property which returns the number of request scopes that we are currently holding onto for pending redirects. |
int |
getRequestScopeExpirationMilliseconds()
|
NameContext |
getRootContextForRequest(DynamoHttpServletRequest pRequest)
Get the root reqwuest scope for the specified request. |
GenericContext |
getSavedRequestScope(java.lang.Object pKey,
int pId,
java.lang.String pSessionId)
Returns the saved request scope, while also removing it from the saved store. |
boolean |
getSaveRequestScopeOnRedirect()
|
Scheduler |
getScheduler()
Returns the Scheduler used to run the expiration and swapping checks. |
boolean |
isInheritsEffectiveScope()
|
void |
performScheduledTask(Scheduler pScheduler,
ScheduledJob pJob)
This is called once for the minimum timeout specified by save requestScope. |
int |
readId()
|
boolean |
removeContext(java.lang.Object pKey)
Removes the request context object stored for the key specified |
int |
saveRequestScope(java.lang.Object pKey,
java.lang.String pSessionId)
Save a request scope, returning an integer id with which this request scope can later be reclaimed. |
void |
setLostRequestScopeSchedule(Schedule pLostRequestScopeSchedule)
Sets the property LostRequestScopeSchedule. |
void |
setRequestScopeExpirationMilliseconds(int pRequestScopeExpirationMilliseconds)
Sets the property RequestScopeExpirationMilliseconds. |
void |
setSaveRequestScopeOnRedirect(boolean pSaveRequestScopeOnRedirect)
Sets the property SaveRequestScopeOnRedirect. |
void |
setScheduler(Scheduler pScheduler)
Sets the Scheduler used to run the expiration and swapping checks. |
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 |
Methods inherited from interface atg.naming.NameContextElement |
---|
getName, getNameContext |
Methods inherited from interface atg.naming.NameContextBindingListener |
---|
nameContextElementBound, nameContextElementUnbound |
Field Detail |
---|
public static final java.lang.String CLASS_VERSION
Constructor Detail |
---|
public RequestScopeManager()
Method Detail |
---|
public void doStartService() throws ServiceException
GenericService
doStartService
in class GenericService
ServiceException
- if the Service had a problem starting uppublic void doStopService() throws ServiceException
GenericContext
doStopService
in class GenericContext
ServiceException
- if the Service had a problem shutting downpublic Scheduler getScheduler()
public void setScheduler(Scheduler pScheduler)
public void setLostRequestScopeSchedule(Schedule pLostRequestScopeSchedule)
public Schedule getLostRequestScopeSchedule()
public void setRequestScopeExpirationMilliseconds(int pRequestScopeExpirationMilliseconds)
public int getRequestScopeExpirationMilliseconds()
public void setSaveRequestScopeOnRedirect(boolean pSaveRequestScopeOnRedirect)
public boolean getSaveRequestScopeOnRedirect()
public int getNumSavedRequestScopes()
public int generateId()
public int readId()
public GenericContext getContext(java.lang.Object pKey)
public GenericContext getContext(java.lang.Object pKey, int pId)
public int saveRequestScope(java.lang.Object pKey, java.lang.String pSessionId)
public GenericContext getSavedRequestScope(java.lang.Object pKey, int pId, java.lang.String pSessionId)
public java.lang.String getManagedScopeName()
getManagedScopeName
in interface atg.nucleus.ScopeManager
public void performScheduledTask(Scheduler pScheduler, ScheduledJob pJob)
performScheduledTask
in interface Schedulable
pScheduler
- calling the jobpJob
- the ScheduledJobpublic boolean removeContext(java.lang.Object pKey)
public NameContext getRootContextForRequest(DynamoHttpServletRequest pRequest)
getRootContextForRequest
in interface atg.nucleus.ScopeManager
pRequest
- the request to access.public boolean canReferenceOtherScope(atg.nucleus.ScopeManager pScopeManager)
canReferenceOtherScope
in interface atg.nucleus.ScopeManager
public boolean isInheritsEffectiveScope()
isInheritsEffectiveScope
in interface atg.nucleus.ScopeManager
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |