Package jade.wrapper

Examples of jade.wrapper.ContainerController


  private static void testAgents() throws Exception {
   
    final Runtime rt = Runtime.instance();
    Profile p = new ProfileImpl();
    p.setParameter("gui", "false");
    ContainerController cc = rt.createMainContainer(p);
   
    java.lang.Runtime.getRuntime().addShutdownHook(new Thread()
    {
        @Override
        public void run()
        {
            rt.shutDown();
        }
    });
   
    AgentController initiator = cc.createNewAgent("Initiator",
        InitiatorAgent.class.getCanonicalName(), null);
    AgentController participant1 = cc.createNewAgent("Participant-1",
        ParticipantAgent.class.getCanonicalName(), null);
    AgentController participant2 = cc.createNewAgent("Participant-2",
        ParticipantAgent.class.getCanonicalName(), null);
    AgentController participant3 = cc.createNewAgent("Participant-3",
        ParticipantAgent.class.getCanonicalName(), null);
   
   
    participant1.start();
    participant2.start();
View Full Code Here


  private static void testAgents() throws Exception {
   
    final Runtime rt = Runtime.instance();
    Profile p = new ProfileImpl();
    p.setParameter("gui", "true");
    ContainerController cc = rt.createMainContainer(p);
   
    java.lang.Runtime.getRuntime().addShutdownHook(new Thread()
    {
        @Override
        public void run()
        {
            rt.shutDown();
        }
    });
   
    AgentController initiator = cc.createNewAgent("Initiator",
        InitiatorAgent.class.getCanonicalName(), null);
   
    ArrayList<AgentController> participants = new ArrayList<AgentController>();
    for (int i=0;i<20;i++) {
      participants.add(cc.createNewAgent("Participant-"+i,
        ParticipantAgent.class.getCanonicalName(), null));
    }
   
    for (AgentController part : participants) {
      part.start();
View Full Code Here

  private static void testAgents() throws Exception {
   
    final Runtime rt = Runtime.instance();
    Profile p = new ProfileImpl();
    p.setParameter("gui", "true");
    ContainerController cc = rt.createMainContainer(p);
   
    java.lang.Runtime.getRuntime().addShutdownHook(new Thread()
    {
        @Override
        public void run()
        {
            rt.shutDown();
        }
    });
   
    AgentController initiator = cc.createNewAgent("Initiator",
        InitiatorAgent.class.getCanonicalName(), null);
   
    ArrayList<AgentController> participants = new ArrayList<AgentController>();
    for (int i=0;i<2;i++) {
      participants.add(cc.createNewAgent("Participant-"+i,
        ParticipantAgent.class.getCanonicalName(), null));
    }
   
    for (AgentController part : participants) {
      part.start();
View Full Code Here

  private static void testAgents() throws Exception {
   
    Runtime rt = Runtime.instance();
    Profile p = new ProfileImpl();
    p.setParameter("gui", "true");
    ContainerController cc = rt.createMainContainer(p);
    AgentController senderAgent1 = cc.createNewAgent("SenderAgent-1",
        SenderAgent.class.getCanonicalName(), null);
    AgentController senderAgent2 = cc.createNewAgent("SenderAgent-2",
        SenderAgent.class.getCanonicalName(), null);
    AgentController senderAgent3 = cc.createNewAgent("SenderAgent-3",
        SenderAgent.class.getCanonicalName(), null);
    AgentController receiverAgent1 = cc.createNewAgent("ReceiverAgent-1",
        ReceiverAgent.class.getCanonicalName(), null);
//    AgentController receiverAgent2 = cc.createNewAgent("ReceiverAgent-2",
//        ReceiverAgent.class.getCanonicalName(), null);
//    AgentController receiverAgent3 = cc.createNewAgent("ReceiverAgent-3",
//        ReceiverAgent.class.getCanonicalName(), null);
View Full Code Here

  private static void testAgents() throws Exception {
   
    final Runtime rt = Runtime.instance();
    Profile p = new ProfileImpl();
    p.setParameter("gui", "true");
    ContainerController cc = rt.createMainContainer(p);
   
    java.lang.Runtime.getRuntime().addShutdownHook(new Thread()
    {
        @Override
        public void run()
        {
            rt.shutDown();
        }
    });
   
    AgentController initiator = cc.createNewAgent("Initiator",
        InitiatorAgent.class.getCanonicalName(), null);
    AgentController participant1 = cc.createNewAgent("Participant-1",
        ParticipantAgent.class.getCanonicalName(), null);
    AgentController participant2 = cc.createNewAgent("Participant-2",
        ParticipantAgent.class.getCanonicalName(), null);
    AgentController participant3 = cc.createNewAgent("Participant-3",
        ParticipantAgent.class.getCanonicalName(), null);
   
   
    participant1.start();
    participant2.start();
View Full Code Here

TOP

Related Classes of jade.wrapper.ContainerController

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.