Examples of InternalError


Examples of jade.domain.FIPAAgentManagement.InternalError

      public void run() {
        try {
          myPlatform.create(agentName, className, args, container, owner, initialCredentials, requesterPrincipal, requesterCredentials);
        } catch (UnreachableException ue) {
          // Send failure notification to the requester if any. Note that UnreachableException also wraps IMTPException that is not necessarily related to a real un-reachability problem
          sendFailureNotification(ca, agentID, new InternalError(ue.getMessage()));
        } catch (JADESecurityException ae) {
          if (logger.isLoggable(Logger.SEVERE))
            logger.log(Logger.SEVERE, "Agent " + requester.getName() + " does not have permission to perform action Create-agent: " + ae);
          // Send failure notification to the requester if any
          sendFailureNotification(ca, agentID, new Unauthorised());
        } catch (NotFoundException nfe) {
          // Send failure notification to the requester if any
          sendFailureNotification(ca, agentID, new InternalError("Destination container not found. " + nfe.getMessage()));
        } catch (NameClashException nce) {
          // Send failure notification to the requester if any
          sendFailureNotification(ca, agentID, new AlreadyRegistered());
        } catch (Throwable t) {
          // Send failure notification to the requester if any
          sendFailureNotification(ca, agentID, new InternalError(t.getMessage()));
        }
      }
    };
    auxThread.start();
  }
View Full Code Here

Examples of jade.domain.FIPAAgentManagement.InternalError

    } catch (JADESecurityException ae) {
      if (logger.isLoggable(Logger.SEVERE))
        logger.log(Logger.SEVERE, "Agent " + requester.getName() + " does not have permission to perform action KillAgent");
      throw new Unauthorised();
    } catch (UnreachableException ue) {
      throw new InternalError("Container not reachable. " + ue.getMessage());
    } catch (NotFoundException nfe) {
      throw new InternalError("Agent not found. " + nfe.getMessage());
    } catch (Exception e) {
      e.printStackTrace();
      throw new InternalError("Unexpected exception. " + e.getMessage());
    }
  }
View Full Code Here

Examples of jade.domain.FIPAAgentManagement.InternalError

    } catch (JADESecurityException ae) {
      if (logger.isLoggable(Logger.SEVERE))
        logger.log(Logger.SEVERE, "Agent " + requester.getName() + " does not have permission to perform action CloneAgent");
      throw new Unauthorised();
    } catch (UnreachableException ue) {
      throw new InternalError("Container not reachable. " + ue.getMessage());
    } catch (NotFoundException nfe) {
      throw new InternalError("NotFoundException. " + nfe.getMessage());
    } catch (NameClashException nce) {
      throw new AlreadyRegistered();
    } catch (Exception e) {
      e.printStackTrace();
      throw new InternalError("Unexpected exception. " + e.getMessage());
    }
  }
View Full Code Here

Examples of jade.domain.FIPAAgentManagement.InternalError

    } catch (JADESecurityException ae) {
      if (logger.isLoggable(Logger.SEVERE))
        logger.log(Logger.SEVERE, "Agent " + requester.getName() + " does not have permission to perform action MoveAgent");
      throw new Unauthorised();
    } catch (UnreachableException ue) {
      throw new InternalError("Container not reachable. " + ue.getMessage());
    } catch (NotFoundException nfe) {
      throw new InternalError("NotFoundException. " + nfe.getMessage());
    } catch (Exception e) {
      e.printStackTrace();
      throw new InternalError("Unexpected exception. " + e.getMessage());
    }
  }
View Full Code Here

Examples of jade.domain.FIPAAgentManagement.InternalError

          logger.log(Logger.SEVERE, "Agent " + requester.getName() + " does not have permission to perform action Kill-container: " + ae);
          // Send failure notification to the requester if any
          sendFailureNotification(kc, cid, new Unauthorised());
        } catch (NotFoundException nfe) {
          // Send failure notification to the requester if any
          sendFailureNotification(kc, cid, new InternalError("Container not found. " + nfe.getMessage()));
        } catch (UnreachableException ue) {
          // Send failure notification to the requester if any
          sendFailureNotification(kc, cid, new InternalError("Container unreachable. " + ue.getMessage()));
        } catch (Throwable t) {
          // Send failure notification to the requester if any
          sendFailureNotification(kc, cid, new InternalError(t.getMessage()));
        }
      }
    };

    auxThread.start();
View Full Code Here

Examples of jade.domain.FIPAAgentManagement.InternalError

      logger.log(Logger.FINE, "Agent " + requester + " requesting Install-MTP");
    // FIXME: Permissions for this action are not yet defined
    try {
      return myPlatform.installMTP(im.getAddress(), im.getContainer(), im.getClassName());
    } catch (NotFoundException nfe) {
      throw new InternalError("Container not found. " + nfe.getMessage());
    } catch (UnreachableException ue) {
      throw new InternalError("Container unreachable. " + ue.getMessage());
    } catch (MTPException mtpe) {
      throw new InternalError("Error in MTP installation. " + mtpe.getMessage());
    }
  }
View Full Code Here

Examples of jade.domain.FIPAAgentManagement.InternalError

      logger.log(Logger.FINE, "Agent " + requester + " requesting Uninstall-MTP");
    // FIXME: Permissions for this action are not yet defined
    try {
      myPlatform.uninstallMTP(um.getAddress(), um.getContainer());
    } catch (NotFoundException nfe) {
      throw new InternalError("Container not found. " + nfe.getMessage());
    } catch (UnreachableException ue) {
      throw new InternalError("Container unreachable. " + ue.getMessage());
    } catch (MTPException mtpe) {
      throw new InternalError("Error in MTP de-installation. " + mtpe.getMessage());
    }
  }
View Full Code Here

Examples of jade.domain.FIPAAgentManagement.InternalError

      logger.log(Logger.FINE, "Agent " + requester + " requesting Sniff-on");
    // FIXME: Permissions for this action are not yet defined
    try {
      myPlatform.sniffOn(so.getSniffer(), so.getCloneOfSniffedAgents());
    } catch (NotFoundException nfe) {
      throw new InternalError("Agent not found. " + nfe.getMessage());
    } catch (UnreachableException ue) {
      throw new InternalError("Container unreachable. " + ue.getMessage());
    }
  }
View Full Code Here

Examples of jade.domain.FIPAAgentManagement.InternalError

      logger.log(Logger.FINE, "Agent " + requester + " requesting Sniff-off");
    // FIXME: Permissions for this action are not yet defined
    try {
      myPlatform.sniffOff(so.getSniffer(), so.getCloneOfSniffedAgents());
    } catch (NotFoundException nfe) {
      throw new InternalError("Agent not found. " + nfe.getMessage());
    } catch (UnreachableException ue) {
      throw new InternalError("Container unreachable. " + ue.getMessage());
    }
  }
View Full Code Here

Examples of jade.domain.FIPAAgentManagement.InternalError

          Object[] removed = (Object[]) it.next();
          ACLMessage msg = (ACLMessage) removed[0];
          AID receiver = new AID((String) removed[1], AID.ISLOCALNAME);           
          ServiceFinder myFinder = getServiceFinder();
          MessagingService msgSvc = (MessagingService) myFinder.findService(MessagingSlice.NAME);
          msgSvc.notifyFailureToSender(new GenericMessage(msg), receiver, new InternalError("Agent dead"))
        }
        catch (Exception e) {
          myLogger.log(Logger.WARNING, "Cannot send AMS FAILURE. "+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.