Package org.eclnt.jsfserver.elements
Class ThreadData
java.lang.Object
org.eclnt.jsfserver.elements.ThreadData
- All Implemented Interfaces:
Serializable
Data which is managed on thread level for each request processing. The
ThreadData is defined/invoked within the
When a request enters the server side processing then an thread-date-object is assigned to the thread - accumulating and holding certain data which is only valid through the current request processing. After the request is processed the thread data is cleaned - waiting for the next request being processed in this thread.
ThreadingFilter servlet
filter. When a request enters the server side processing then an thread-date-object is assigned to the thread - accumulating and holding certain data which is only valid through the current request processing. After the request is processed the thread data is cleaned - waiting for the next request being processed in this thread.
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classContext information that can be extracted out of the current UI-thread and then injected into a non-UI-thread, so that access to CaptainCasa context functions that are related to the dialog session is available. -
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionvoidaddClientTestLogMessage(String message) voidaddConsumedNanosComment(String comment, long nanos) Internal usage.voidaddConsumedNanosGet(String comment, long nanos) Internal usage.voidaddConsumedNanosInvoke(String comment, long nanos) Internal usage.voidaddConsumedNanosPhase(String comment, long nanos) Internal usage.voidaddRequestEvent(Object event) Internal usage only. - Add event to the list of events fot this request.booleanbooleanbooleanInternal use.voidclean()internal use only - the clean() is called at the very beginning of each request processing (CCFilterBase.doFilter(jakarta.servlet.ServletRequest, jakarta.servlet.ServletResponse, jakarta.servlet.FilterChain).static voidclearThreadDataFromNonUIThread(Thread nonUIThread) Clear context information from external thread.voiddestroy()Cleans up Threaddata and removes it out of the thread-map.Extracts objects from the current UI-thread to be injected into another process.longInternal usage: number of property-get-resolutions that were executed within the current request.booleanInternal usage: checks ifClientToBeReloadedExceptionexception occurred during processing.Internal use: set of component ids which are to be encodedlongInternal usage: number of nano seconds that were spent with resolving properties.When having switched onSystemXml.getThreadContextStoreCurrentExpression()then the currently processed expression is available via this method.booleanInternal use.jakarta.servlet.http.HttpServletRequestjakarta.servlet.http.HttpServletResponsejakarta.servlet.http.HttpSessionstatic ThreadDatastatic ThreadDatagetInstance(boolean createNewOneIfMissing) static ThreadDatagetInstance(Thread thread, boolean createNewOneIfMissing) internal use onlyinternal use onlyInternal use.booleanProfile mode: if true then per request profiling information is written.Internal usage only. - List of events as object list.All events that are processed within one request are stored in this list.longPoint of time when request server processing was finished.longlongPoint of time when request was received in server processing.longEvery browser instance is associated with a unique id - which is the "subpageId".booleaninternal use onlyvoidinitHttpRequest(jakarta.servlet.http.HttpServletRequest httpRequest) Internal use.voidinitHttpResponse(jakarta.servlet.http.HttpServletResponse httpResponse) Internal use.voidinitHttpSession(jakarta.servlet.http.HttpSession session) Internal use.voidinitIsUIThread(boolean value) Internal use.voidinitSubpageId(String subpageId) Internal use.static voidinjectExtThread(Thread nonUIThread) Transfers the context of the current UI-thread into the external thread that is passed.static voidinjectExtThread(Thread nonUIThread, ThreadData.ExtThreadInjectionInfo info) Counter part ofextractExtThreadInjectionInfo().booleanInternal usage: the request-focus-processing can be blocked for the current request processing.voidIncluded pages (ROWINCLUDE usage) may only be updated if an event occurred within the scope of the page (attribute ROWINCLUDE-UPDATEONINNEREVENTONLY).voidregisterCurrentlyProcessedExpression(jakarta.el.Expression currentlyProcessedExpression) Internal use.voidregisterIsolatedUpdateZone(Object zone, boolean asEntranceZone) internal use only - registration of ROWINCLUDE components that are "isolated event areas (e.g. valid values popup).voidvoidsetClientIsInTestMode(boolean clientIsInTestMode) voidInternal usage: passes information thatClientToBeReloadedExceptionwas thrown during processing.voidsetComponentIdsToBeDecoded(Set<String> componentIdsToBeEncoded) voidsetCurrentInvokeExpression(String currentInvokeExpression) Internal use only.voidsetCurrentRequestRebuildsContent(boolean currentRequestRebuildsContent) Internal use.voidsetNewClientId(String newClientId) Internal use.voidsetProfileMode(boolean profileMode) voidsetRequestFocusMgmtBlocked(boolean requestFocusMgmtBlocked) voidsetStampEndOfProcessing(long stampEndOfProcessing, String requestId) voidsetStampStartOfClientProcessing(long stampStartOfClientProcessing) voidsetStampStartOfProcessing(long stampStartOfProcessing) voidsetStampStartOfWritingResponse(long value) voidvoidInternal use.
-
Field Details
-
s_loggging_constructor_severe
public static boolean s_loggging_constructor_severe
-
-
Method Details
-
getInstance
-
getInstance
-
getInstance
-
extractExtThreadInjectionInfo
Extracts objects from the current UI-thread to be injected into another process. For injections useinjectExtThread(Thread, ExtThreadInjectionInfo). As consequence the other process can access functions e.g. fromHttpSessionAccessthat are related to the current dialog session. -
injectExtThread
Counter part ofextractExtThreadInjectionInfo(). Injects the information into the thread that is passed.
Make sure to callclearThreadDataFromNonUIThread(Thread)at the end of using the external thread. -
injectExtThread
Transfers the context of the current UI-thread into the external thread that is passed.
Make sure to callclearThreadDataFromNonUIThread(Thread)at the end of using the external thread. -
clearThreadDataFromNonUIThread
Clear context information from external thread. -
registerChangeUpdatingAllAreas
public void registerChangeUpdatingAllAreas()Included pages (ROWINCLUDE usage) may only be updated if an event occurred within the scope of the page (attribute ROWINCLUDE-UPDATEONINNEREVENTONLY). By calling this method you define that all areas will be checked for updates within the current event processing. -
unregisterChangeUpdatingAllAreas
public void unregisterChangeUpdatingAllAreas() -
getUpdateAllAreasIsRequired
public boolean getUpdateAllAreasIsRequired()internal use only -
registerIsolatedUpdateZone
internal use only - registration of ROWINCLUDE components that are "isolated event areas (e.g. valid values popup). Events within this areas only cause a dedicated render-processing of exactly these areas. -
checkIfContainedAsIsolatedUpdateZone
-
checkIfContainedAsIsolatedUpdateZoneEntrance
-
initHttpRequest
public void initHttpRequest(jakarta.servlet.http.HttpServletRequest httpRequest) Internal use. -
initHttpResponse
public void initHttpResponse(jakarta.servlet.http.HttpServletResponse httpResponse) Internal use. -
initSubpageId
Internal use. -
initHttpSession
public void initHttpSession(jakarta.servlet.http.HttpSession session) Internal use. -
initIsUIThread
public void initIsUIThread(boolean value) Internal use. -
getHttpRequest
public jakarta.servlet.http.HttpServletRequest getHttpRequest() -
getHttpResponse
public jakarta.servlet.http.HttpServletResponse getHttpResponse() -
getHttpSession
public jakarta.servlet.http.HttpSession getHttpSession() -
getSubpageId
Every browser instance is associated with a unique id - which is the "subpageId". In scenarios in which session tracking is done via cookies the subpageId is used to identify the client instance (which typically is the representations of a browser/browser tab).
Pay attention the subpageId is not available "at all situations" but must be explicitly passed. In case of http request processing it is "only" available within the processing of dedicated servlets (including the POST processing of the data commmunication from the client, of course). -
registerNoIsolation
public void registerNoIsolation() -
getIsolatedUpdateZones
internal use only -
getIsolatedUpdateZonesEntrance
internal use only -
clean
public void clean()internal use only - the clean() is called at the very beginning of each request processing (CCFilterBase.doFilter(jakarta.servlet.ServletRequest, jakarta.servlet.ServletResponse, jakarta.servlet.FilterChain). -
addClientTestLogMessage
-
getClientTestLogMessage
-
getClientIsInTestMode
public boolean getClientIsInTestMode() -
setClientIsInTestMode
public void setClientIsInTestMode(boolean clientIsInTestMode) -
addConsumedNanosGet
Internal usage. -
addConsumedNanosInvoke
Internal usage. -
addConsumedNanosPhase
Internal usage. -
addConsumedNanosComment
Internal usage. -
getConsumedNanosGet
public long getConsumedNanosGet()Internal usage: number of nano seconds that were spent with resolving properties. -
getCallCountGet
public long getCallCountGet()Internal usage: number of property-get-resolutions that were executed within the current request. -
getClientToBeReloadedExceptionOccurred
Internal usage: checks ifClientToBeReloadedExceptionexception occurred during processing. -
setClientToBeReloadedExceptionOccurred
Internal usage: passes information thatClientToBeReloadedExceptionwas thrown during processing. -
isRequestFocusMgmtBlocked
public boolean isRequestFocusMgmtBlocked()Internal usage: the request-focus-processing can be blocked for the current request processing. -
setRequestFocusMgmtBlocked
public void setRequestFocusMgmtBlocked(boolean requestFocusMgmtBlocked) -
getProfileMode
public boolean getProfileMode()Profile mode: if true then per request profiling information is written. The profiling information is useful for server side performance analysis. -
setProfileMode
public void setProfileMode(boolean profileMode) -
getProfileLogInfos
- Returns:
- Profile logging messages that were collected during the current request processing.
-
getCurrentInvokeExpression
- Returns:
- Method that is/was executed within the current request processing.
-
setCurrentInvokeExpression
Internal use only. -
getRequestEvents
All events that are processed within one request are stored in this list. You may read (...and only read!!) the list of events, after the decode phase of the request processing. -
addRequestEvent
Internal usage only. - Add event to the list of events fot this request. -
getRequestEventObjects
Internal usage only. - List of events as object list. -
getStampStartOfProcessing
public long getStampStartOfProcessing()Point of time when request was received in server processing. -
setStampStartOfProcessing
public void setStampStartOfProcessing(long stampStartOfProcessing) -
getStampStartOfClientProcessing
public long getStampStartOfClientProcessing() -
setStampStartOfClientProcessing
public void setStampStartOfClientProcessing(long stampStartOfClientProcessing) -
getStampStartOfWritingResponse
public long getStampStartOfWritingResponse() -
setStampStartOfWritingResponse
public void setStampStartOfWritingResponse(long value) -
getStampEndOfProcessing
public long getStampEndOfProcessing()Point of time when request server processing was finished. -
setStampEndOfProcessing
-
getRowincludeDump
-
destroy
public void destroy()Cleans up Threaddata and removes it out of the thread-map. -
getComponentIdsToBeDecoded
Internal use: set of component ids which are to be encoded -
setComponentIdsToBeDecoded
-
getCurrentlyProcessedExpression
When having switched onSystemXml.getThreadContextStoreCurrentExpression()then the currently processed expression is available via this method. The expression might either be an expression to a property or an expression to method. -
registerCurrentlyProcessedExpression
public void registerCurrentlyProcessedExpression(jakarta.el.Expression currentlyProcessedExpression) Internal use. -
unregisterCurrentlyProcessedExpression
public void unregisterCurrentlyProcessedExpression()Internal use. -
getNewClientId
Internal use. -
setNewClientId
Internal use. -
getCurrentRequestRebuildsContent
public boolean getCurrentRequestRebuildsContent()Internal use. -
setCurrentRequestRebuildsContent
public void setCurrentRequestRebuildsContent(boolean currentRequestRebuildsContent) Internal use. -
checkIfUIThread
public boolean checkIfUIThread()Internal use.
-