Class JadeBridge


  • public class JadeBridge
    extends Object
    Send an ACL message to the JADE socket proxy agent which is running on a host system and listening on a particular port.
    • Constructor Detail

      • JadeBridge

        public JadeBridge()
        Constructor - uses default host and port number.
      • JadeBridge

        public JadeBridge​(String aHost,
                          int aPort)
        Constructor with specified host name and port number.
        Parameters:
        aHost - Name of host.
        aPort - Port number.
    • Method Detail

      • getHost

        public String getHost()
        get host for this bridge
        Returns:
        host for this bridge
      • getPort

        public int getPort()
        get port for this bridge
        Returns:
        port for this bridge
      • sendMessage

        public String sendMessage​(String aMsg)
        send and receive ACL messages using java.lang.String
        Parameters:
        aMsg - The message to send as a string.
        Returns:
        The response as a string or error message if anything goes wrong.
      • sendMessage

        public ACLMessage sendMessage​(ACLMessage aMsg)
        Send an ACL message and wait for the reply for a default timeout (1 min)
        Parameters:
        aMsg - The message to send
        Returns:
        The response or error message if anything goes wrong.
      • sendMessage

        public ACLMessage sendMessage​(ACLMessage aMsg,
                                      long timeout)
        Send an ACL message and wait for the reply for a given timeout in ms
        Parameters:
        aMsg - The message to send
        timeout - The timeout for receiving the response
        Returns:
        The response or error message if anything goes wrong.