Methods Summary |
---|
public void | addApplicationProperty(java.lang.String property)Adds the name of a property from the url properties that should
be added to the JMS message.
if (property == null)
return;
if (appProperties == null)
appProperties = new Vector();
appProperties.addElement(property);
|
public void | addApplicationProperty(java.lang.String property, java.lang.String value)Adds the name and value od the application property to the
JMS URL.
if (property == null)
return;
if (appProperties == null)
appProperties = new Vector();
properties.put(property, value);
appProperties.addElement(property);
|
public void | addRequiredProperties(java.lang.String[] properties)
if (properties == null)
return;
for (int i = 0; i < properties.length; i++)
{
addRequiredProperty(properties[i]);
}
|
public void | addRequiredProperty(java.lang.String property)
if (property == null)
return;
if (requiredProperties == null)
requiredProperties = new Vector();
requiredProperties.addElement(property);
|
public java.util.Vector | getApplicationProperties()Returns a collection of properties that are defined within the
JMS URL to be added directly to the JMS messages.
return appProperties;
|
public java.lang.String | getDestination()
return destination;
|
public java.lang.String | getDomain()
return getPropertyValue(JMSConstants._DOMAIN);
|
public java.util.HashMap | getProperties()
return properties;
|
public java.lang.String | getPropertyValue(java.lang.String property)
return (String)properties.get(property);
|
public java.util.Vector | getRequiredProperties()
return requiredProperties;
|
public java.lang.String | getURLString()Returns a URL formatted String. The properties of the URL may not
end up in the same order as the JMS URL that was originally used to
create this object.
StringBuffer text = new StringBuffer("jms:/");
text.append(getDestination());
text.append("?");
Map props = (Map)properties.clone();
boolean firstEntry = true;
for(Iterator itr=properties.keySet().iterator(); itr.hasNext();) {
String key = (String)itr.next();
if (!firstEntry) {
text.append("&");
}
if (appProperties.contains(key)) {
text.append(JMSConstants._MSG_PROP_PREFIX);
}
text.append(key);
text.append("=");
text.append(props.get(key));
firstEntry = false;
}
return text.toString();
|
public java.lang.String | getVendor()
return getPropertyValue(JMSConstants._VENDOR);
|
public void | setDestination(java.lang.String destination)
this.destination = destination;
|
public java.lang.String | toString()Returns a formatted URL String with the assigned properties
return getURLString();
|
private void | validateURL()
Vector required = getRequiredProperties();
if (required == null)
return;
for (int i = 0; i < required.size(); i++)
{
String key = (String)required.elementAt(i);
if (properties.get(key) == null)
throw new java.net.MalformedURLException();
}
|