Examples of JADEPrincipal


Examples of jade.security.JADEPrincipal

    }
   
    private void handleNotifyChangedAgentPrincipal(VerticalCommand cmd) {
      Object[] params = cmd.getParams();
      AID id = (AID)params[0];
      JADEPrincipal from = (JADEPrincipal)params[1];
      JADEPrincipal to = (JADEPrincipal)params[2];
     
      fireChangedAgentPrincipal(id, from, to);
    }
View Full Code Here

Examples of jade.security.JADEPrincipal

    Concept action = slAction.getAction();
    Object result = null;
    boolean resultNeeded = false;
    Object asynchNotificationKey = null;

    JADEPrincipal requesterPrincipal = null;
    Credentials requesterCredentials = null;
    try {
      CredentialsHelper ch = (CredentialsHelper) myAgent.getHelper("jade.core.security.Security");
      requesterPrincipal = ch.getPrincipal(request);
      requesterCredentials = ch.getCredentials(request);
View Full Code Here

Examples of jade.security.JADEPrincipal

 
  void initSystemAgents(AgentContainer localContainer, boolean restarting) throws IMTPException, NotFoundException, JADESecurityException {
    ContainerID cid = localContainer.getID();
    NodeDescriptor dsc = getDescriptor(cid.getName());
    // The owner of both the AMS and the DF is the owner of the main container.
    JADEPrincipal cp = dsc.getOwnerPrincipal();   
    try {
      ((Agent) theAMS).setRestarting(restarting);
      AID amsId = localContainer.getAMS();
      // The AMS has NO initial credentials
      localContainer.initAgent(amsId, theAMS, cp, null);
View Full Code Here

Examples of jade.security.JADEPrincipal

 
  void restartReplicatedAgents(AgentContainer localContainer) throws IMTPException, NotFoundException, JADESecurityException {
    ContainerID cid = localContainer.getID();
    NodeDescriptor dsc = getDescriptor(cid.getName());
    // The owner of the replicated agents is the owner of the main container.
    JADEPrincipal cp = dsc.getOwnerPrincipal()
    Iterator it = replicatedAgents.keySet().iterator();
    while (it.hasNext()) {
      AID aid = (AID) it.next();
      try {
        String className = (String) replicatedAgents.get(aid);
View Full Code Here

Examples of jade.security.JADEPrincipal

      MainContainer impl = myContainer.getMain();
      if(impl != null) {
        // Retrieve the ownership from the credentials
        String ownership = "NONE";
        if (credentials != null) {
          JADEPrincipal ownerPr = credentials.getOwner();
          if (ownerPr != null) {
            ownership = ownerPr.getName();
          }
        }
        // If the name is already in the GADT, throws NameClashException
        bornAgent(agentID, cid, null, ownership, false);
        // Since bornAgent() succeeded, directly apply forceReplacement on replicated Main Containers
View Full Code Here

Examples of jade.security.JADEPrincipal

    ArrayList listArg = new ArrayList();
    while (it.hasNext()) {
      listArg.add(it.next());
    }
    final Object[] args = listArg.toArray();
    final JADEPrincipal owner = ca.getOwner();
    final Credentials initialCredentials = ca.getInitialCredentials();

    // Do the job in a separated thread to avoid deadlock
    Thread auxThread = new Thread() {
      public void run() {
View Full Code Here

Examples of jade.security.JADEPrincipal

    private void bornAgent(AID name, ContainerID cid, JADEPrincipal principal, Credentials credentials) throws NameClashException, NotFoundException {
      // Retrieve the ownership from the credentials
      String ownership = "NONE";
      if (credentials != null) {
        JADEPrincipal ownerPr = credentials.getOwner();
        if (ownerPr != null) {
          ownership = ownerPr.getName();
        }
      }
      try {
        // If the name is already in the GADT, throws NameClashException
        myMain.bornAgent(name, cid, principal, ownership, false);
View Full Code Here

Examples of jade.security.JADEPrincipal

      Object[] params = cmd.getParams();
      String name = (String)params[0];
      String className = (String)params[1];
      Object[]args = (Object[])params[2];
      ContainerID cid = (ContainerID)params[3];
      JADEPrincipal owner = (JADEPrincipal) params[4];
      Credentials initialCredentials = (Credentials) params[5];
     
      if(myLogger.isLoggable(Logger.CONFIG))
        myLogger.log(Logger.CONFIG,"Source Sink consuming command REQUEST_CREATE. Name is "+name);
      MainContainer impl = myContainer.getMain();
View Full Code Here

Examples of jade.security.JADEPrincipal

     
      Object[] params = cmd.getParams();
      AID agentID = (AID)params[0];
      String className = (String)params[1];
      Object[] arguments = (Object[])params[2];
      JADEPrincipal owner = (JADEPrincipal)params[3];
      Credentials initialCredentials = (Credentials)params[4];
      boolean startIt = ((Boolean) params[5]).booleanValue();
     
      //log("Target sink consuming command REQUEST_CREATE: Name is "+agentID.getName(), 2);
      if(myLogger.isLoggable(Logger.FINE))
View Full Code Here

Examples of jade.security.JADEPrincipal

      MainContainer impl = myContainer.getMain();
      if(impl != null) {
        // Retrieve the ownership from the credentials
        String ownership = "NONE";
        if (credentials != null) {
          JADEPrincipal ownerPr = credentials.getOwner();
          if (ownerPr != null) {
            ownership = ownerPr.getName();
          }
        }
        try {
          // If the name is already in the GADT, throws NameClashException
          impl.bornAgent(name, cid, principal, ownership, false);
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.