if (Logging.authorityService.isDebugEnabled())
{
Logging.authorityService.debug("Received authority request for user '"+userID+"'");
}
RequestQueue queue = ManifoldCF.getRequestQueue();
if (queue == null)
{
// System wasn't started; return unauthorized
throw new ManifoldCFException("System improperly initialized");
}
IThreadContext itc = ThreadContextFactory.make();
IAuthorityConnectionManager authConnManager = AuthorityConnectionManagerFactory.make(itc);
IAuthorityConnection[] connections = authConnManager.getAllConnections();
int i = 0;
AuthRequest[] requests = new AuthRequest[connections.length];
// Queue up all the requests
while (i < connections.length)
{
IAuthorityConnection ac = connections[i];
String identifyingString = ac.getDescription();
if (identifyingString == null || identifyingString.length() == 0)
identifyingString = ac.getName();
AuthRequest ar = new AuthRequest(userID,ac.getClassName(),identifyingString,ac.getConfigParams(),ac.getMaxConnections());
queue.addRequest(ar);
requests[i++] = ar;
}
// Now, work through the returning answers.