Package org.apache.wicket
Class ThreadContext
java.lang.Object
org.apache.wicket.ThreadContext
Holds thread local state for Wicket data.
- Author:
- Matej Knopp
-
Method Summary
Modifier and TypeMethodDescriptionstatic ThreadContext
detach()
Cleans theThreadContext
and returns previous context.static boolean
exists()
Checks ifThreadContext
exists for the current threadstatic ThreadContext
get
(boolean createIfDoesNotExist) INTERNAL METHODstatic Application
static RequestCycle
static Session
static void
restore
(ThreadContext threadContext) Restores the contextstatic void
setApplication
(Application application) Binds the specified application to current thread.static void
setRequestCycle
(RequestCycle requestCycle) Binds theRequestCycle
to current thread.static void
setSession
(Session session) Binds the session to current thread.
-
Method Details
-
get
INTERNAL METHOD- Parameters:
createIfDoesNotExist
-- Returns:
- ThreadContext
-
exists
Checks ifThreadContext
exists for the current thread- Returns:
true
ifThreadContext
exists for the current thread
-
getApplication
- Returns:
Application
bound to current thread
-
setApplication
Binds the specified application to current thread.- Parameters:
application
-
-
getRequestCycle
- Returns:
RequestCycle
bound to current thrad
-
setRequestCycle
Binds theRequestCycle
to current thread.- Parameters:
requestCycle
-
-
getSession
- Returns:
Session
bound to current thread
-
setSession
Binds the session to current thread.- Parameters:
session
-
-
detach
Cleans theThreadContext
and returns previous context.- Returns:
- old
ThreadContext
-
restore
Restores the context- Parameters:
threadContext
-- See Also:
-