Methods Summary |
---|
public boolean | equals(java.lang.Object obj)Two MQUrls are identified by their id (name).
if (obj instanceof MQUrl) {
return this.id.equals(((MQUrl)obj).id);
} else {
return false;
}
|
public int | hashCode()Hashcode of MQurl is the same as the Hashcode of its name.
return id.hashCode();
|
public void | setHost(java.lang.String host)Sets the host name of the Url.
this.host = host;
|
public void | setPort(java.lang.String port)Sets the port number of the Url.
this.port = port;
|
public void | setScheme(java.lang.String scheme)Sets the Scheme of MQ connection for this Url.
Eg> mq, mtcp, mqssl ...
this.scheme = scheme;
|
public void | setService(java.lang.String service)Sets the type of service offered by MQ broker.
Eg> jms, jmsssl etc.
this.service = service;
|
public java.lang.String | toString()String representation of the Url.
i.e> scheme://host:port/service
Eg> mq://javasoft12:7676/jmsssl
if ( host.equals("")) {
return "";
}
if ( port.equals("") && service.equals("")) {
return scheme + "://" + host;
}
if (service.equals("")) {
return scheme + "://" + host + ":" + port + "/";
}
return scheme + "://" + host + ":" + port + "/" + service;
|