Class AuthThreadManager

  • All Implemented Interfaces:
    Runnable

    public class AuthThreadManager
    extends Thread
    AuthThreadManager sleeps for n milliseconds as set in iplanet-am-auth-sleep-interval wakes up and checks for each thread in the timeout Hash for timeout. If thread has timed out adds thread to timedOutHash and removed from timeoutHash.
    • Constructor Detail

      • AuthThreadManager

        public AuthThreadManager()
        Creates AuthThreadManager object.
    • Method Detail

      • run

        public void run()
        thread sleeps for n milliseconds as set in iplanet-am-auth-sleep-interval wakes up and checks for each thread in the timeout Hash for timeout. if thread has timed out adds thread to timedOutHash and removed from timeoutHash
        Specified by:
        run in interface Runnable
        Overrides:
        run in class Thread
      • isLoginTimeout

        public boolean isLoginTimeout​(long lastCallbackSent,
                                      long timeout)
        Checks login state for time out
        Parameters:
        lastCallbackSent - time for last callback was sent.
        timeout - configured timeout value.
        Returns:
        true if the thread is timed out.
      • setHash

        public void setHash​(Thread currentThread,
                            long pageTimeOut,
                            long lastCallbackSent)
        Stores the thread as key and the time out value & last callback sent in a Hashtable
        Parameters:
        currentThread - will be stored
        pageTimeOut - configured timeout value
        lastCallbackSent - time for last callback was sent
      • isTimedOut

        public boolean isTimedOut​(Thread thread)
        Checks if thread has timed out
        Parameters:
        thread - will be checked
        Returns:
        true if the is timed out
      • removeFromHash

        public void removeFromHash​(Thread thread,
                                   String hashName)
        Removes thread from Hashtable specified by hashName
        Parameters:
        thread - will be removed from the hash
        hashName - has associated thread