Search code examples
javaagents-jade

how to message another agent at remote host using jade?


I am a novice to JADE . I want to message an agent on remote host from another agent,but other than starting an agent platform from cmd i cannot figure out anything. Hope to get this issue resolved. Thanks in advance.


Solution

  • Sorry community for wasting your time here i have figured it out myself:-

        ACLMessage msgp = new ACLMessage(ACLMessage.SUBSCRIBE);
        msgp.setContent("subscribe1");
        AID remoteAMSf = new AID("salubhai@192.168.2.9:12349/JADE", AID.ISGUID);
        remoteAMSf.addAddresses("http://192.168.2.9:64505/acc");
        msgp.addReceiver(remoteAMSf);
        send(msgp);