Class ThreadContext


  • public class ThreadContext
    extends Object
    Holds thread local state for Wicket data.
    Author:
    Matej Knopp
    • Method Detail

      • get

        public static ThreadContext get​(boolean createIfDoesNotExist)
        INTERNAL METHOD
        Parameters:
        createIfDoesNotExist -
        Returns:
        ThreadContext
      • exists

        public static boolean exists()
        Checks if ThreadContext exists for the current thread
        Returns:
        true if ThreadContext exists for the current thread
      • setApplication

        public static void setApplication​(Application application)
        Binds the specified application to current thread.
        Parameters:
        application -
      • setRequestCycle

        public static void setRequestCycle​(RequestCycle requestCycle)
        Binds the RequestCycle to current thread.
        Parameters:
        requestCycle -
      • getSession

        public static Session getSession()
        Returns:
        Session bound to current thread
      • setSession

        public static void setSession​(Session session)
        Binds the session to current thread.
        Parameters:
        session -
      • restore

        public static void restore​(ThreadContext threadContext)
        Restores the context
        Parameters:
        threadContext -
        See Also:
        detach()