Package org.apache.manifoldcf.authorities.system

Examples of org.apache.manifoldcf.authorities.system.RequestQueue


      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.
View Full Code Here


      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.
View Full Code Here

      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.
View Full Code Here

TOP

Related Classes of org.apache.manifoldcf.authorities.system.RequestQueue

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.