Class ThreadData

java.lang.Object
org.eclnt.jsfserver.elements.ThreadData
All Implemented Interfaces:
Serializable

public class ThreadData extends Object implements Serializable
Data which is managed on thread level for each request processing. The ThreadData is defined/invoked within the 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:
  • Constructor Details

    • ThreadData

      public ThreadData()
  • Method Details

    • getInstance

      public static ThreadData getInstance()
    • getInstance

      public static ThreadData getInstance(boolean createNewOneIfMissing)
    • getInstance

      public static ThreadData getInstance(Thread thread, boolean createNewOneIfMissing)
    • extractExtThreadInjectionInfo

      public static ThreadData.ExtThreadInjectionInfo extractExtThreadInjectionInfo()
      Extracts objects from the current UI-thread to be injected into another process. For injections use injectExtThread(Thread, ExtThreadInjectionInfo). As consequence the other process can access functions e.g. from HttpSessionAccess that are related to the current dialog session.
    • injectExtThread

      public static void injectExtThread(Thread nonUIThread, ThreadData.ExtThreadInjectionInfo info)
      Counter part of extractExtThreadInjectionInfo(). Injects the information into the thread that is passed.

      Make sure to call clearThreadDataFromNonUIThread(Thread) at the end of using the external thread.
    • injectExtThread

      public static void injectExtThread(Thread nonUIThread)
      Transfers the context of the current UI-thread into the external thread that is passed.

      Make sure to call clearThreadDataFromNonUIThread(Thread) at the end of using the external thread.
    • clearThreadDataFromNonUIThread

      public static void clearThreadDataFromNonUIThread(Thread nonUIThread)
      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

      public void registerIsolatedUpdateZone(Object zone)
      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

      public boolean checkIfContainedAsIsolatedUpdateZone(Object zone)
    • initHttpRequest

      public void initHttpRequest(javax.servlet.http.HttpServletRequest httpRequest)
    • initHttpResponse

      public void initHttpResponse(javax.servlet.http.HttpServletResponse httpResponse)
    • initSubpageId

      public void initSubpageId(String subpageId)
    • 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

      public String 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

      public Set<Object> 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

      public void addClientTestLogMessage(String message)
    • getClientTestLogMessage

      public String getClientTestLogMessage()
    • getClientIsInTestMode

      public boolean getClientIsInTestMode()
    • setClientIsInTestMode

      public void setClientIsInTestMode(boolean clientIsInTestMode)
    • addConsumedNanosGet

      public void addConsumedNanosGet(String comment, long nanos)
      Internal usage.
    • addConsumedNanosInvoke

      public void addConsumedNanosInvoke(String comment, long nanos)
      Internal usage.
    • addConsumedNanosPhase

      public void addConsumedNanosPhase(String comment, long nanos)
      Internal usage.
    • addConsumedNanosComment

      public void addConsumedNanosComment(String comment, long nanos)
      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

      public ClientToBeReloadedException getClientToBeReloadedExceptionOccurred()
      Internal usage: checks if ClientToBeReloadedException exception occurred during processing.
    • setClientToBeReloadedExceptionOccurred

      public void setClientToBeReloadedExceptionOccurred(ClientToBeReloadedException exc)
      Internal usage: passes information that ClientToBeReloadedException 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

      public List<ProfileLogInfo> getProfileLogInfos()
      Returns:
      Profile logging messages that were collected during the current request processing.
    • getCurrentInvokeExpression

      public String getCurrentInvokeExpression()
      Returns:
      Method that is/was executed within the current request processing.
    • setCurrentInvokeExpression

      public void setCurrentInvokeExpression(String currentInvokeExpression)
      Internal use only.
    • getRequestEvents

      public List<javax.faces.event.FacesEvent> 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

      public void addRequestEvent(Object event)
      Internal usage only. - Add event to the list of events fot this request.
    • getRequestEventObjects

      public List<Object> 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

      public void setStampEndOfProcessing(long stampEndOfProcessing, String requestId)
    • getRowincludeDump

      public ROWINCLUDEDump getRowincludeDump()
    • destroy

      public void destroy()
      Cleans up Threaddata and removes it out of the thread-map.
    • getComponentIdsToBeDecoded

      public Set<String> getComponentIdsToBeDecoded()
      Internal use: set of component ids which are to be encoded
    • setComponentIdsToBeDecoded

      public void setComponentIdsToBeDecoded(Set<String> componentIdsToBeEncoded)
    • getCurrentlyProcessedExpression

      public String getCurrentlyProcessedExpression()
      When having switched on SystemXml.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

      public String getNewClientId()
      Internal use.
    • setNewClientId

      public void setNewClientId(String newClientId)
      Internal use.
    • getCurrentRequestRebuildsContent

      public boolean getCurrentRequestRebuildsContent()
      Internal use.
    • setCurrentRequestRebuildsContent

      public void setCurrentRequestRebuildsContent(boolean currentRequestRebuildsContent)
      Internal use.