Class ExternalContextHolder
java.lang.Object
org.springframework.webflow.context.ExternalContextHolder
Simple holder class that associates an
ExternalContext
instance with the current thread. The ExternalContext
will not be inherited by any child threads spawned by the current thread.
Used as a central holder for the current ExternalContext in Spring Web Flow, wherever necessary. Often used by artifacts needing access to the current application session.
- Author:
- Keith Donald
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionstatic ExternalContext
Return the ExternalContext associated with the current thread, if any.static void
setExternalContext
(ExternalContext externalContext) Associate the given ExternalContext with the current thread.
-
Method Details
-
setExternalContext
Associate the given ExternalContext with the current thread.- Parameters:
externalContext
- the current ExternalContext, ornull
to reset the thread-bound context
-
getExternalContext
Return the ExternalContext associated with the current thread, if any.- Returns:
- the current ExternalContext
-