Class AuthThreadManager
- java.lang.Object
-
- java.lang.Thread
-
- com.sun.identity.authentication.service.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.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class java.lang.Thread
Thread.State, Thread.UncaughtExceptionHandler
-
-
Field Summary
-
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
-
-
Constructor Summary
Constructors Constructor Description AuthThreadManager()CreatesAuthThreadManagerobject.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanisLoginTimeout(long lastCallbackSent, long timeout)Checks login state for time outbooleanisTimedOut(Thread thread)Checks if thread has timed outvoidremoveFromHash(Thread thread, String hashName)Removes thread fromHashtablespecified by hashNamevoidrun()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.voidsetHash(Thread currentThread, long pageTimeOut, long lastCallbackSent)Stores the thread as key and the time out value & last callback sent in a Hashtable-
Methods inherited from class java.lang.Thread
activeCount, checkAccess, clone, countStackFrames, currentThread, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, onSpinWait, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, suspend, toString, yield
-
-
-
-
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
-
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:
trueif 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 storedpageTimeOut- configured timeout valuelastCallbackSent- time for last callback was sent
-
isTimedOut
public boolean isTimedOut(Thread thread)
Checks if thread has timed out- Parameters:
thread- will be checked- Returns:
trueif the is timed out
-
-