net.fckeditor.requestcycle
Class ThreadLocalData

java.lang.Object
  extended by net.fckeditor.requestcycle.ThreadLocalData

public class ThreadLocalData
extends Object

Maintains current context and request instances. This container relies on ThreadLocal and provides static access to the aforementioned objects for the current File Browse request. This means that this class is thread-safe.

Version:
$Id: ThreadLocalData.java 4785 2009-12-21 20:10:28Z mosipov $

Constructor Summary
ThreadLocalData()
           
 
Method Summary
static void beginRequest(HttpServletRequest request)
          Initializes the current request cycle.
static void endRequest()
          Terminates the current request cycle.
static Context getContext()
          Returns the current context instance.
static HttpServletRequest getRequest()
          Returns the current user request instance.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ThreadLocalData

public ThreadLocalData()
Method Detail

beginRequest

public static void beginRequest(HttpServletRequest request)
Initializes the current request cycle.

Parameters:
request - current user request instance

getRequest

public static HttpServletRequest getRequest()
Returns the current user request instance.

Returns:
the current user request instance

getContext

public static Context getContext()
Returns the current context instance.

Returns:
the current context instance

endRequest

public static void endRequest()
Terminates the current request cycle.
Important: To prevent memory leaks, make sure that this method is called at the end of the current request cycle!



Copyright © 2004-2010 Frederico Caldeira Knabben. All Rights Reserved.