Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  • We need this information for all HTTP related methods
  • We need this information for HTTP filters
  • Only one HttpTimer should be available for one user request. It is not meaningful to have multiple HTTP Timer Datas (one per Filter) in a long chain of filters.
  • HttpTimer is a specialized version of the common Timer that provides additional information about the HTTP Request. 
  • HttpTimer will be integrated in invocation sequences instead of common timers (that is, the HttpTimer will overwrite any existing Timer. Each Timer must check if an httpTimer is already added and only add itself if none is there)

Design

  • Filters and HttpServlets are always within a chain. That means that at the topmost level there are no two HttpTimers. Thus we can threadlocally increase the number of HttpTimers and only for the first one add a real HttpTimer object, every other one just increases/decreases the count (at start and end). Thus we know when we reach the first one again and then remove the thread local information again. By this design we ensure that we have only one HttpTimer per User Request.
  •