issrg.utils.repository
Class MultiThreadSearch
java.lang.Object
issrg.utils.repository.MultiThreadSearch
- All Implemented Interfaces:
- java.lang.Runnable
public class MultiThreadSearch
- extends java.lang.Object
- implements java.lang.Runnable
This is a utility class that does the actual search in multiple repositories
using multiple threads. The logic of invocation must guarantee that it is
used from a single Thread.
Method Summary |
protected javax.naming.directory.Attributes |
getAttributes(java.security.Principal[] DN,
AttributeRepository[] repositories,
java.lang.String[] AttributeNames)
This method sets up a number of threads, each retrieving the whole set of
attributes from one repository using the corresponding entry name. |
void |
run()
This method is needed for efficient Attribute retrieval. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
status
protected int status
diagnosis
protected java.lang.Throwable diagnosis
MultiThreadSearch
protected MultiThreadSearch()
getAttributes
protected javax.naming.directory.Attributes getAttributes(java.security.Principal[] DN,
AttributeRepository[] repositories,
java.lang.String[] AttributeNames)
throws RepositoryException
- This method sets up a number of threads, each retrieving the whole set of
attributes from one repository using the corresponding entry name. The
list of entry names must be synchronous with the list of repositories.
As the result of calling this method, the diagnosis and status will be
set.
- Parameters:
DN
- - the entry names; one for each repositoryrepositories
- - the repositories; one for each entry in the DN arrayAttributeNames
- - the names of the attributes to be retrieved from
all repositories; if null, all available attributes will be retrieved
- Returns:
- the requested Attributes
- Throws:
RepositoryException
run
public void run()
- This method is needed for efficient Attribute retrieval. You should not
call it directly, as this is part of Runnable interface.
- Specified by:
run
in interface java.lang.Runnable