Package it.unito.di.artifact.CommunicationArtifact

Examples of it.unito.di.artifact.CommunicationArtifact.CARole.send()


        if (r < 50)
          test.setPerformative(ACLMessage.INFORM);
        else
          test.setPerformative(ACLMessage.AGREE);
                       
        user.send(test);
               
      }
    });
  }
 
View Full Code Here


        ArrayList<RoleMessage> receive = user.receiveAll(ACLMessage.AGREE);
        logger.info("Message received: "+receive.size());
        if (receive.size() != 0) {
          // respond to message
          RoleMessage answer = new RoleMessage(user.getRoleId(),receive.get(0).getRoleSender(),"Ti rispondo alla prova!");
          user.send(answer);
        }
       
       
       
      }
View Full Code Here

        if (r < 50)
          test.setPerformative(ACLMessage.INFORM);
        else
          test.setPerformative(ACLMessage.AGREE);
                       
        user.send(test);
               
      }
    });
  }
 
View Full Code Here

        ArrayList<CAMessage> receive = user.receiveAll(ACLMessage.AGREE);
        logger.info("Message received: "+receive.size());
        if (receive.size() != 0) {
          // respond to message
          CAMessage answer = new CAMessage(user.getRoleId(),receive.get(0).getRoleSender(),"Ti rispondo alla prova!");
          user.send(answer);
        }
       
       
       
      }
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.