Class MQUrl


  • public class MQUrl
    extends Object
    Represents one of the MQ address list elements.
    Author:
    Binod P.G
    • Constructor Detail

      • MQUrl

        public MQUrl​(String id)
        Constructs the MQUrl with the id. Id is actually the name of JmsHost element in the domain.xml.
        Parameters:
        id - Logical name of the MQUrl
    • Method Detail

      • setHost

        public void setHost​(String host)
        Sets the host name of the Url.
        Parameters:
        host - Host Name of the Url.
      • setPort

        public void setPort​(String port)
        Sets the port number of the Url.
        Parameters:
        port - Port number of the Url.
      • setScheme

        public void setScheme​(String scheme)
        Sets the Scheme of MQ connection for this Url. Eg> mq, mtcp, mqssl ...
        Parameters:
        scheme - scheme of the connection.
      • setService

        public void setService​(String service)
        Sets the type of service offered by MQ broker. Eg> jms, jmsssl etc.
        Parameters:
        service - Name of service.
      • toString

        public String toString()
        String representation of the Url. i.e> scheme://host:port/service Eg> mq://javasoft12:7676/jmsssl
        Overrides:
        toString in class Object
        Returns:
        String representation of Url.
      • equals

        public boolean equals​(Object obj)
        Two MQUrls are identified by their id (name).
        Overrides:
        equals in class Object
        Parameters:
        obj - another MQUrl object.
        Returns:
        a boolean indicating whether MQUrls are equal.
      • hashCode

        public int hashCode()
        Hashcode of MQurl is the same as the Hashcode of its name.
        Overrides:
        hashCode in class Object
        Returns:
        hashcode of MQUrl