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
Modifier and TypeClassDescriptionstatic class
Context 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. -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addClientTestLogMessage
(String message) void
addConsumedNanosComment
(String comment, long nanos) Internal usage.void
addConsumedNanosGet
(String comment, long nanos) Internal usage.void
addConsumedNanosInvoke
(String comment, long nanos) Internal usage.void
addConsumedNanosPhase
(String comment, long nanos) Internal usage.void
addRequestEvent
(Object event) Internal usage only. - Add event to the list of events fot this request.boolean
void
clean()
internal use only - the clean() is called at the very beginning of each request processing (CCFilterBase.doFilter(javax.servlet.ServletRequest, javax.servlet.ServletResponse, javax.servlet.FilterChain)
.static void
clearThreadDataFromNonUIThread
(Thread nonUIThread) Clear context information from external thread.void
destroy()
Cleans up Threaddata and removes it out of the thread-map.Extracts objects from the current UI-thread to be injected into another process.long
Internal usage: number of property-get-resolutions that were executed within the current request.boolean
Internal usage: checks ifClientToBeReloadedException
exception occurred during processing.Internal use: set of component ids which are to be encodedlong
Internal 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.boolean
Internal use.javax.servlet.http.HttpServletRequest
javax.servlet.http.HttpServletResponse
javax.servlet.http.HttpSession
static ThreadData
static ThreadData
getInstance
(boolean createNewOneIfMissing) static ThreadData
getInstance
(Thread thread, boolean createNewOneIfMissing) internal use onlyInternal use.boolean
Profile mode: if true then per request profiling information is written.Internal usage only. - List of events as object list.List<javax.faces.event.FacesEvent>
All events that are processed within one request are stored in this list.long
Point of time when request server processing was finished.long
long
Point of time when request was received in server processing.long
Every browser instance is associated with a unique id - which is the "subpageId".boolean
internal use onlyvoid
initHttpRequest
(javax.servlet.http.HttpServletRequest httpRequest) void
initHttpResponse
(javax.servlet.http.HttpServletResponse httpResponse) void
initHttpSession
(javax.servlet.http.HttpSession session) void
initSubpageId
(String subpageId) static void
injectExtThread
(Thread nonUIThread) Transfers the context of the current UI-thread into the external thread that is passed.static void
injectExtThread
(Thread nonUIThread, ThreadData.ExtThreadInjectionInfo info) Counter part ofextractExtThreadInjectionInfo()
.boolean
Internal usage: the request-focus-processing can be blocked for the current request processing.void
Included pages (ROWINCLUDE usage) may only be updated if an event occurred within the scope of the page (attribute ROWINCLUDE-UPDATEONINNEREVENTONLY).void
registerCurrentlyProcessedExpression
(javax.el.Expression currentlyProcessedExpression) Internal use.void
internal use only - registration of ROWINCLUDE components that are "isolated event areas (e.g. valid values popup).void
void
setClientIsInTestMode
(boolean clientIsInTestMode) void
Internal usage: passes information thatClientToBeReloadedException
was thrown during processing.void
setComponentIdsToBeDecoded
(Set<String> componentIdsToBeEncoded) void
setCurrentInvokeExpression
(String currentInvokeExpression) Internal use only.void
setCurrentRequestRebuildsContent
(boolean currentRequestRebuildsContent) Internal use.void
setNewClientId
(String newClientId) Internal use.void
setProfileMode
(boolean profileMode) void
setRequestFocusMgmtBlocked
(boolean requestFocusMgmtBlocked) void
setStampEndOfProcessing
(long stampEndOfProcessing, String requestId) void
setStampStartOfClientProcessing
(long stampStartOfClientProcessing) void
setStampStartOfProcessing
(long stampStartOfProcessing) void
setStampStartOfWritingResponse
(long value) void
void
Internal use.
-
Constructor Details
-
ThreadData
public ThreadData()
-
-
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. fromHttpSessionAccess
that 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
-
initHttpRequest
public void initHttpRequest(javax.servlet.http.HttpServletRequest httpRequest) -
initHttpResponse
public void initHttpResponse(javax.servlet.http.HttpServletResponse httpResponse) -
initSubpageId
-
initHttpSession
public void initHttpSession(javax.servlet.http.HttpSession session) -
getHttpRequest
public javax.servlet.http.HttpServletRequest getHttpRequest() -
getHttpResponse
public javax.servlet.http.HttpServletResponse getHttpResponse() -
getHttpSession
public javax.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() -
getIsolatedUpadateZones
internal use only -
clean
public void clean()internal use only - the clean() is called at the very beginning of each request processing (CCFilterBase.doFilter(javax.servlet.ServletRequest, javax.servlet.ServletResponse, javax.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 ifClientToBeReloadedException
exception occurred during processing. -
setClientToBeReloadedExceptionOccurred
Internal usage: passes information thatClientToBeReloadedException
was 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(javax.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.
-