public class ThreadPool
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
(package private) class |
ThreadPool.AuthenticateThread
A thread as an inner class, that authenticates against one particular
pool.
|
(package private) class |
ThreadPool.ConditionVariable
A wrapper around an int that acts as a Condition Variable, and is used
as such.
|
Modifier and Type | Field and Description |
---|---|
private org.ietf.jgss.GSSCredential |
mCredential
The credential loaded from the non default location if specified.
|
private ThreadPool.ConditionVariable |
mCurrentNum
The condition variable that is used to synchronize the shutdown.
|
private java.util.Set |
mExecPools
The Set of pools that need to be authenticated against.
|
private ENV |
mLocalEnv
The namespace object holding the environment variables for local
pool.
|
private LogManager |
mLogger
The handle to the LogManager object.
|
private java.lang.Integer |
mNumOfPools
The number of pools that one has to authenticate against.
|
private PoolInfoProvider |
mPoolHandle
The handle to the Pool Info Provider.
|
private PegasusProperties |
mProps
The handle to the properties object.
|
private java.util.LinkedList |
mQueue
The request queue that holds the authenticate requests.
|
private ThreadPool.AuthenticateThread[] |
mWorkers
The handle to the pool of threads that this thread pool is reponsible for.
|
static int |
NUMBER_OF_THREADS
The maximum number of authentication threads that are spawned.
|
Constructor and Description |
---|
ThreadPool(PegasusProperties properties,
java.util.Set pools)
The overloaded constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
acceptRequest(java.lang.Object request)
Accepts an authentication request, that has to be serviced.
|
private org.ietf.jgss.GSSCredential |
getGSSCredential(java.lang.String file)
Loads a GSSCredential from the proxy file residing at the path specified.
|
private ENV |
loadLocalEnvVariables()
Reads in the environment variables into memory from the properties file
and the pool catalog.
|
void |
shutdown()
This method is called to ensure the clean shutdown of threads, and
waits till all the requests have been serviced.
|
public static final int NUMBER_OF_THREADS
private java.util.LinkedList mQueue
private PegasusProperties mProps
private PoolInfoProvider mPoolHandle
private LogManager mLogger
private java.util.Set mExecPools
private java.lang.Integer mNumOfPools
private ThreadPool.AuthenticateThread[] mWorkers
private ThreadPool.ConditionVariable mCurrentNum
private ENV mLocalEnv
private org.ietf.jgss.GSSCredential mCredential
public ThreadPool(PegasusProperties properties, java.util.Set pools)
properties
- the PegasusProperties
to be used.pools
- the set of pools against which the user is authenticating.public void shutdown()
public void acceptRequest(java.lang.Object request)
private ENV loadLocalEnvVariables()
ENV
namespace object holding the environment
variables.private org.ietf.jgss.GSSCredential getGSSCredential(java.lang.String file)
file
- the path to the proxy file.