Examples of MappingRequest


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

        String identifyingString = thisConnection.getDescription();
        if (identifyingString == null || identifyingString.length() == 0)
          identifyingString = connectionName;

        // Create a request
        MappingRequest mr = new MappingRequest(
          thisConnection.getClassName(),identifyingString,thisConnection.getConfigParams(),thisConnection.getMaxConnections());
        mappingRequests.put(connectionName, mr);

        // Either start up a thread, or just fire it off immediately.
        if (thisConnection.getPrerequisiteMapping() == null)
        {
          mr.setUserID(userID);
          mappingQueue.addRequest(mr);
        }
        else
        {
          //System.out.println("Mapper: prerequisite found: '"+thisConnection.getPrerequisiteMapping()+"'");
          MappingOrderThread thread = new MappingOrderThread(identifyingString,
            mr, thisConnection.getPrerequisiteMapping(), mappingQueue, mappingRequests);
          mappingThreads.add(thread);
          String p = thisConnection.getPrerequisiteMapping();
          if (mappingRequests.get(p) == null)
            activeConnections.add(p);
        }
        activeConnections.remove(connectionName);
      }
     
      // Start threads.  We have to wait until all the requests have been
      // at least created before we do this.
      for (MappingOrderThread thread : mappingThreads)
      {
        thread.start();
      }
      for (AuthOrderThread thread : authThreads)
      {
        thread.start();
      }
     
      // Wait for the threads to finish up.  This will guarantee that all entities have run to completion.
      for (MappingOrderThread thread : mappingThreads)
      {
        thread.finishUp();
      }
      for (AuthOrderThread thread : authThreads)
      {
        thread.finishUp();
      }
     
      // This is probably unnecessary, but we do it anyway just to adhere to the contract
      for (MappingRequest mr : mappingRequests.values())
      {
        mr.waitForComplete();
      }
     
      // Handle all exceptions thrown during mapping.  In general this just means logging them, because
      // the downstream authorities will presumably not find what they are looking for and error out that way.
      for (MappingRequest mr : mappingRequests.values())
      {
        Throwable exception = mr.getAnswerException();
        if (exception != null)
        {
          Logging.authorityService.warn("Mapping exception logged from "+mr.getIdentifyingString()+": "+exception.getMessage()+"; mapper aborted", exception);
        }
      }
     
      // Now, work through the returning answers.
View Full Code Here

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

   
    public void run()
    {
      try
      {
        MappingRequest mappingRequest = requests.get(prerequisite);
        mappingRequest.waitForComplete();
        // Constraints are met.  Fire off the request.
        request.setUserID(mappingRequest.getAnswerResponse());
        mappingRequestQueue.addRequest(request);
      }
      catch (Throwable e)
      {
        exception = e;
View Full Code Here

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

   
    public void run()
    {
      try
      {
        MappingRequest mappingRequest = mappingRequests.get(prerequisite);
        mappingRequest.waitForComplete();
        // Constraints are met.  Fire off the request.  User may be null if mapper failed!!
        request.setUserID(mappingRequest.getAnswerResponse());
        authRequestQueue.addRequest(request);
      }
      catch (Throwable e)
      {
        exception = e;
View Full Code Here

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

        String identifyingString = thisConnection.getDescription();
        if (identifyingString == null || identifyingString.length() == 0)
          identifyingString = connectionName;

        // Create a request
        MappingRequest mr = new MappingRequest(thisConnection,identifyingString);
        mappingRequests.put(mapperDesc, mr);

        // Either start up a thread, or just fire it off immediately.
        if (thisConnection.getPrerequisiteMapping() == null)
        {
          mr.setUserID(domainMap.get(authDomain));
          mappingQueue.addRequest(mr);
        }
        else
        {
          //System.out.println("Mapper: prerequisite found: '"+thisConnection.getPrerequisiteMapping()+"'");
          MapperDescription p = new MapperDescription(thisConnection.getPrerequisiteMapping(),authDomain);
          MappingOrderThread thread = new MappingOrderThread(identifyingString,
            mr, p, mappingQueue, mappingRequests);
          mappingThreads.add(thread);
          if (mappingRequests.get(p) == null)
            activeConnections.add(p);
        }
        activeConnections.remove(mapperDesc);
      }
     
      // Start threads.  We have to wait until all the requests have been
      // at least created before we do this.
      for (MappingOrderThread thread : mappingThreads)
      {
        thread.start();
      }
      for (AuthOrderThread thread : authThreads)
      {
        thread.start();
      }
     
      // Wait for the threads to finish up.  This will guarantee that all entities have run to completion.
      for (MappingOrderThread thread : mappingThreads)
      {
        thread.finishUp();
      }
      for (AuthOrderThread thread : authThreads)
      {
        thread.finishUp();
      }
     
      // This is probably unnecessary, but we do it anyway just to adhere to the contract
      for (MappingRequest mr : mappingRequests.values())
      {
        mr.waitForComplete();
      }
     
      // Handle all exceptions thrown during mapping.  In general this just means logging them, because
      // the downstream authorities will presumably not find what they are looking for and error out that way.
      for (MappingRequest mr : mappingRequests.values())
      {
        Throwable exception = mr.getAnswerException();
        if (exception != null)
        {
          Logging.authorityService.warn("Mapping exception logged from "+mr.getIdentifyingString()+": "+exception.getMessage()+"; mapper aborted", exception);
        }
      }
     
      // Now, work through the returning answers.
View Full Code Here

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

   
    public void run()
    {
      try
      {
        MappingRequest mappingRequest = requests.get(prerequisite);
        mappingRequest.waitForComplete();
        // Constraints are met.  Fire off the request.
        request.setUserID(mappingRequest.getAnswerResponse());
        mappingRequestQueue.addRequest(request);
      }
      catch (Throwable e)
      {
        exception = e;
View Full Code Here

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

   
    public void run()
    {
      try
      {
        MappingRequest mappingRequest = mappingRequests.get(prerequisite);
        mappingRequest.waitForComplete();
        // Constraints are met.  Fire off the request.  User may be null if mapper failed!!
        request.setUserID(mappingRequest.getAnswerResponse());
        authRequestQueue.addRequest(request);
      }
      catch (Throwable e)
      {
        exception = e;
View Full Code Here

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

        String identifyingString = thisConnection.getDescription();
        if (identifyingString == null || identifyingString.length() == 0)
          identifyingString = connectionName;

        // Create a request
        MappingRequest mr = new MappingRequest(thisConnection,identifyingString);
        mappingRequests.put(mapperDesc, mr);

        // Either start up a thread, or just fire it off immediately.
        if (thisConnection.getPrerequisiteMapping() == null)
        {
          mr.setUserID(domainMap.get(authDomain));
          mappingQueue.addRequest(mr);
        }
        else
        {
          //System.out.println("Mapper: prerequisite found: '"+thisConnection.getPrerequisiteMapping()+"'");
          MapperDescription p = new MapperDescription(thisConnection.getPrerequisiteMapping(),authDomain);
          MappingOrderThread thread = new MappingOrderThread(identifyingString,
            mr, p, mappingQueue, mappingRequests);
          mappingThreads.add(thread);
          if (mappingRequests.get(p) == null)
            activeConnections.add(p);
        }
        activeConnections.remove(mapperDesc);
      }
     
      // Start threads.  We have to wait until all the requests have been
      // at least created before we do this.
      for (MappingOrderThread thread : mappingThreads)
      {
        thread.start();
      }
      for (AuthOrderThread thread : authThreads)
      {
        thread.start();
      }
     
      // Wait for the threads to finish up.  This will guarantee that all entities have run to completion.
      for (MappingOrderThread thread : mappingThreads)
      {
        thread.finishUp();
      }
      for (AuthOrderThread thread : authThreads)
      {
        thread.finishUp();
      }
     
      // This is probably unnecessary, but we do it anyway just to adhere to the contract
      for (MappingRequest mr : mappingRequests.values())
      {
        mr.waitForComplete();
      }
     
      // Handle all exceptions thrown during mapping.  In general this just means logging them, because
      // the downstream authorities will presumably not find what they are looking for and error out that way.
      for (MappingRequest mr : mappingRequests.values())
      {
        Throwable exception = mr.getAnswerException();
        if (exception != null)
        {
          Logging.authorityService.warn("Mapping exception logged from "+mr.getIdentifyingString()+": "+exception.getMessage()+"; mapper aborted", exception);
        }
      }
     
      // Now, work through the returning answers.
View Full Code Here

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

   
    public void run()
    {
      try
      {
        MappingRequest mappingRequest = requests.get(prerequisite);
        mappingRequest.waitForComplete();
        // Constraints are met.  Fire off the request.
        request.setUserID(mappingRequest.getAnswerResponse());
        mappingRequestQueue.addRequest(request);
      }
      catch (Throwable e)
      {
        exception = e;
View Full Code Here

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

   
    public void run()
    {
      try
      {
        MappingRequest mappingRequest = mappingRequests.get(prerequisite);
        mappingRequest.waitForComplete();
        // Constraints are met.  Fire off the request.  User may be null if mapper failed!!
        request.setUserID(mappingRequest.getAnswerResponse());
        authRequestQueue.addRequest(request);
      }
      catch (Throwable e)
      {
        exception = e;
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.