Added removeAttribute() and removeProperty() methods (INT-203, INT-204).

This commit is contained in:
Mark Fisher
2008-04-22 13:40:42 +00:00
parent e0563a6173
commit c9cdff0aee

View File

@@ -125,6 +125,10 @@ public class MessageHeader implements Serializable {
return (String) this.properties.setProperty(key, value);
}
public String removeProperty(String key) {
return (String) this.properties.remove(key);
}
public Set<String> getPropertyNames() {
Set<String> propertyNames = new HashSet<String>();
for (Object key : this.properties.keySet()) {
@@ -145,6 +149,10 @@ public class MessageHeader implements Serializable {
return this.attributes.putIfAbsent(key, value);
}
public Object removeAttribute(String key) {
return this.attributes.remove(key);
}
public Set<String> getAttributeNames() {
return this.attributes.keySet();
}