Package jade.security

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


    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

 
  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

 
  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

      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

    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

    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

      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

     
      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

      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

Related Classes of jade.security.JADEPrincipal

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.