com.ibm.mq.jms
Class MQRoot
- java.lang.Object
-
- com.ibm.mq.jms.MQRoot
-
- All Implemented Interfaces:
- JmsPropertyContext, JmsReadablePropertyContext, java.io.Serializable, java.util.Map<java.lang.String,java.lang.Object>
- Direct Known Subclasses:
- MQConnection, MQConnectionMetaData, MQMessageConsumer, MQMessageProducer, MQQueueBrowser, MQSession
public abstract class MQRoot extends java.lang.Object implements JmsPropertyContext
This is a root object for all the objects in the package com.ibm.mq.jms; it provides a common point to implement theJmsPropertyContextinterface. The IBM JMS Extensions are implemented by the concrete classes in com.ibm.mq.jms, therefore all objects need to implement the property context interface.- See Also:
- Serialized Form
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description voidclear()Clears all propertiesbooleancontainsKey(java.lang.Object key)Ascertains whether the specified key exists in the properties mapbooleancontainsValue(java.lang.Object value)Ascertains whether the specified value exists in the properties mapjava.util.Set<java.util.Map.Entry<java.lang.String,java.lang.Object>>entrySet()The entry set of the properties mapbooleanequals(java.lang.Object o)java.lang.Objectget(java.lang.Object key)Gets the property associated with the specified keybooleangetBooleanProperty(java.lang.String name)Gets the boolean property value with the given name.bytegetByteProperty(java.lang.String name)Gets the byte property value with the given name.byte[]getBytesProperty(java.lang.String name)Gets the bytes property value with the given name.chargetCharProperty(java.lang.String name)Gets the char property value with the given name.doublegetDoubleProperty(java.lang.String name)Gets the double property value with the given name.floatgetFloatProperty(java.lang.String name)Gets the float property value with the given name.intgetIntProperty(java.lang.String name)Gets the int property value with the given name.longgetLongProperty(java.lang.String name)Gets the long property value with the given name.java.lang.ObjectgetObjectProperty(java.lang.String name)Gets the Object property value with the given name.java.util.Enumeration<java.lang.String>getPropertyNames()Gets all properties which have been set on a resource.shortgetShortProperty(java.lang.String name)Gets the short property value with the given name.java.lang.StringgetStringProperty(java.lang.String name)Gets the String property value with the given name.inthashCode()booleanisEmpty()Indicates whether the properties map is emptyjava.util.Set<java.lang.String>keySet()Gets a Set of the property keys in the property mapbooleanpropertyExists(java.lang.String name)Indicates whether a named property exists.java.lang.Objectput(java.lang.String key, java.lang.Object value)Adds the specified key and value to the properties mapvoidputAll(java.util.Map<? extends java.lang.String,? extends java.lang.Object> properties)Adds the properties in the specified map to the properties mapjava.lang.Objectremove(java.lang.Object key)Removes the property associated with the specified key from the properties map.voidsetBatchProperties(java.util.Map<java.lang.String,java.lang.Object> properties)Sets multiple property values passed in via a HashMap.voidsetBooleanProperty(java.lang.String name, boolean value)Sets a Boolean property value with the given name.voidsetByteProperty(java.lang.String name, byte value)Sets a byte property value with the given name.voidsetBytesProperty(java.lang.String name, byte[] value)Sets a bytes property value with the given name.voidsetCharProperty(java.lang.String name, char value)Sets a char property value with the given name.voidsetDoubleProperty(java.lang.String name, double value)Sets a double property value with the given name.voidsetFloatProperty(java.lang.String name, float value)Sets a float property value with the given name.voidsetIntProperty(java.lang.String name, int value)Sets an int property value with the given name.voidsetLongProperty(java.lang.String name, long value)Sets a long property value with the given name.voidsetObjectProperty(java.lang.String name, java.lang.Object value)Sets an Object property value with the given name.voidsetShortProperty(java.lang.String name, short value)Sets a short property value with the given name.voidsetStringProperty(java.lang.String name, java.lang.String value)Sets a String property value with the given name.intsize()Gets the number of properties in the properties map.java.util.Collection<java.lang.Object>values()Gets the values of properties in the properties map.
-
-
-
Method Detail
-
setBatchProperties
public void setBatchProperties(java.util.Map<java.lang.String,java.lang.Object> properties) throws javax.jms.JMSExceptionSets multiple property values passed in via a HashMap.- Specified by:
setBatchPropertiesin interfaceJmsPropertyContext- Parameters:
properties- the HashMap of properties.- Throws:
javax.jms.JMSException- if any property is marked read-only or if the proposed value is invalid for any property.
-
setBooleanProperty
public void setBooleanProperty(java.lang.String name, boolean value) throws javax.jms.JMSExceptionSets a Boolean property value with the given name.- Specified by:
setBooleanPropertyin interfaceJmsPropertyContext- Parameters:
name- the name of the Boolean property.value- the Boolean property value to set.- Throws:
javax.jms.JMSException- if the property is marked read-only or if the proposed value is invalid for the property.
-
setByteProperty
public void setByteProperty(java.lang.String name, byte value) throws javax.jms.JMSExceptionSets a byte property value with the given name.- Specified by:
setBytePropertyin interfaceJmsPropertyContext- Parameters:
name- the name of the byte property.value- the byte property value to set.- Throws:
javax.jms.JMSException- if the property is marked read-only or if the proposed value is invalid for the property.
-
setBytesProperty
public void setBytesProperty(java.lang.String name, byte[] value) throws javax.jms.JMSExceptionSets a bytes property value with the given name.- Specified by:
setBytesPropertyin interfaceJmsPropertyContext- Parameters:
name- the name of the bytes property.value- the bytes property value to set.- Throws:
javax.jms.JMSException- if the property is marked read-only or if the proposed value is invalid for the property.
-
setCharProperty
public void setCharProperty(java.lang.String name, char value) throws javax.jms.JMSExceptionSets a char property value with the given name.- Specified by:
setCharPropertyin interfaceJmsPropertyContext- Parameters:
name- the name of the char property.value- the char property value to set.- Throws:
javax.jms.JMSException- if the property is marked read-only or if the proposed value is invalid for the property.
-
setDoubleProperty
public void setDoubleProperty(java.lang.String name, double value) throws javax.jms.JMSExceptionSets a double property value with the given name.- Specified by:
setDoublePropertyin interfaceJmsPropertyContext- Parameters:
name- the name of the double property.value- the double property value to set.- Throws:
javax.jms.JMSException- if the property is marked read-only or if the proposed value is invalid for the property.
-
setFloatProperty
public void setFloatProperty(java.lang.String name, float value) throws javax.jms.JMSExceptionSets a float property value with the given name.- Specified by:
setFloatPropertyin interfaceJmsPropertyContext- Parameters:
name- the name of the float property.value- the float property value to set.- Throws:
javax.jms.JMSException- if the property is marked read-only or if the proposed value is invalid for the property.
-
setIntProperty
public void setIntProperty(java.lang.String name, int value) throws javax.jms.JMSExceptionSets an int property value with the given name.- Specified by:
setIntPropertyin interfaceJmsPropertyContext- Parameters:
name- the name of the int property.value- the int property value to set.- Throws:
javax.jms.JMSException- if the property is marked read-only or if the proposed value is invalid for the property.
-
setLongProperty
public void setLongProperty(java.lang.String name, long value) throws javax.jms.JMSExceptionSets a long property value with the given name.- Specified by:
setLongPropertyin interfaceJmsPropertyContext- Parameters:
name- the name of the long property.value- the long property value to set.- Throws:
javax.jms.JMSException- if the property is marked read-only or if the proposed value is invalid for the property.
-
setObjectProperty
public void setObjectProperty(java.lang.String name, java.lang.Object value) throws javax.jms.JMSExceptionSets an Object property value with the given name.- Specified by:
setObjectPropertyin interfaceJmsPropertyContext- Parameters:
name- the name of the Object property.value- the Object property value to set.- Throws:
javax.jms.JMSException- if the property is marked read-only or if the proposed value is invalid for the property.
-
setShortProperty
public void setShortProperty(java.lang.String name, short value) throws javax.jms.JMSExceptionSets a short property value with the given name.- Specified by:
setShortPropertyin interfaceJmsPropertyContext- Parameters:
name- the name of the short property.value- the short property value to set.- Throws:
javax.jms.JMSException- if the property is marked read-only or if the proposed value is invalid for the property.
-
setStringProperty
public void setStringProperty(java.lang.String name, java.lang.String value) throws javax.jms.JMSExceptionSets a String property value with the given name.- Specified by:
setStringPropertyin interfaceJmsPropertyContext- Parameters:
name- the name of the String property.value- the String property value to set.- Throws:
javax.jms.JMSException- if the property is marked read-only or if the proposed value is invalid for the property.
-
getBooleanProperty
public boolean getBooleanProperty(java.lang.String name) throws javax.jms.JMSExceptionGets the boolean property value with the given name.- Specified by:
getBooleanPropertyin interfaceJmsReadablePropertyContext- Parameters:
name- the name of the property to be retrieved.- Returns:
- the boolean property value with the given name.
- Throws:
javax.jms.JMSException
-
getByteProperty
public byte getByteProperty(java.lang.String name) throws javax.jms.JMSExceptionGets the byte property value with the given name.- Specified by:
getBytePropertyin interfaceJmsReadablePropertyContext- Parameters:
name- the name of the property to be retrieved.- Returns:
- the byte property value with the given name.
- Throws:
javax.jms.JMSException
-
getBytesProperty
public byte[] getBytesProperty(java.lang.String name) throws javax.jms.JMSExceptionGets the bytes property value with the given name.- Specified by:
getBytesPropertyin interfaceJmsReadablePropertyContext- Parameters:
name- the name of the property to be retrieved.- Returns:
- the bytes property value with the given name.
- Throws:
javax.jms.JMSException
-
getCharProperty
public char getCharProperty(java.lang.String name) throws javax.jms.JMSExceptionGets the char property value with the given name.- Specified by:
getCharPropertyin interfaceJmsReadablePropertyContext- Parameters:
name- the name of the property to be retrieved.- Returns:
- the char property value with the given name.
- Throws:
javax.jms.JMSException
-
getDoubleProperty
public double getDoubleProperty(java.lang.String name) throws javax.jms.JMSExceptionGets the double property value with the given name.- Specified by:
getDoublePropertyin interfaceJmsReadablePropertyContext- Parameters:
name- the name of the property to be retrieved.- Returns:
- the double property value with the given name.
- Throws:
javax.jms.JMSException
-
getFloatProperty
public float getFloatProperty(java.lang.String name) throws javax.jms.JMSExceptionGets the float property value with the given name.- Specified by:
getFloatPropertyin interfaceJmsReadablePropertyContext- Parameters:
name- the name of the property to be retrieved.- Returns:
- the float property value with the given name.
- Throws:
javax.jms.JMSException
-
getIntProperty
public int getIntProperty(java.lang.String name) throws javax.jms.JMSExceptionGets the int property value with the given name.- Specified by:
getIntPropertyin interfaceJmsReadablePropertyContext- Parameters:
name- the name of the property to be retrieved.- Returns:
- the int property value with the given name.
- Throws:
javax.jms.JMSException
-
getLongProperty
public long getLongProperty(java.lang.String name) throws javax.jms.JMSExceptionGets the long property value with the given name.- Specified by:
getLongPropertyin interfaceJmsReadablePropertyContext- Parameters:
name- the name of the property to be retrieved.- Returns:
- the long property value with the given name.
- Throws:
javax.jms.JMSException
-
getObjectProperty
public java.lang.Object getObjectProperty(java.lang.String name) throws javax.jms.JMSExceptionGets the Object property value with the given name.- Specified by:
getObjectPropertyin interfaceJmsReadablePropertyContext- Parameters:
name- the name of the property to be retrieved.- Returns:
- the Object property value with the given name.
- Throws:
javax.jms.JMSException
-
getPropertyNames
public java.util.Enumeration<java.lang.String> getPropertyNames() throws javax.jms.JMSExceptionGets all properties which have been set on a resource.- Specified by:
getPropertyNamesin interfaceJmsReadablePropertyContext- Returns:
- the Enumeration of all set properties.
- Throws:
javax.jms.JMSException
-
getShortProperty
public short getShortProperty(java.lang.String name) throws javax.jms.JMSExceptionGets the short property value with the given name.- Specified by:
getShortPropertyin interfaceJmsReadablePropertyContext- Parameters:
name- the name of the property to be retrieved.- Returns:
- the short property value with the given name.
- Throws:
javax.jms.JMSException
-
getStringProperty
public java.lang.String getStringProperty(java.lang.String name) throws javax.jms.JMSExceptionGets the String property value with the given name.- Specified by:
getStringPropertyin interfaceJmsReadablePropertyContext- Parameters:
name- the name of the property to be retrieved.- Returns:
- the String property value with the given name.
- Throws:
javax.jms.JMSException
-
propertyExists
public boolean propertyExists(java.lang.String name) throws javax.jms.JMSExceptionIndicates whether a named property exists.- Specified by:
propertyExistsin interfaceJmsReadablePropertyContext- Parameters:
name- the name of the property to be retrieved.- Returns:
- true if the property exists, false if it does not.
- Throws:
javax.jms.JMSException
-
clear
public void clear()
Clears all properties- Specified by:
clearin interfacejava.util.Map<java.lang.String,java.lang.Object>- See Also:
Map.clear()
-
containsKey
public boolean containsKey(java.lang.Object key)
Ascertains whether the specified key exists in the properties map- Specified by:
containsKeyin interfacejava.util.Map<java.lang.String,java.lang.Object>- Parameters:
key- key to check- Returns:
- boolean to indicate if the key exists
- See Also:
Map.containsKey(java.lang.Object)
-
containsValue
public boolean containsValue(java.lang.Object value)
Ascertains whether the specified value exists in the properties map- Specified by:
containsValuein interfacejava.util.Map<java.lang.String,java.lang.Object>- Parameters:
value- value to check- Returns:
- boolean to indicate if the value exists
- See Also:
Map.containsKey(java.lang.Object)
-
entrySet
public java.util.Set<java.util.Map.Entry<java.lang.String,java.lang.Object>> entrySet()
The entry set of the properties map- Specified by:
entrySetin interfacejava.util.Map<java.lang.String,java.lang.Object>- Returns:
- the entry set
- See Also:
Map.entrySet()
-
get
public java.lang.Object get(java.lang.Object key)
Gets the property associated with the specified key- Specified by:
getin interfacejava.util.Map<java.lang.String,java.lang.Object>- Returns:
- the object
- See Also:
Map.get(java.lang.Object)
-
isEmpty
public boolean isEmpty()
Indicates whether the properties map is empty- Specified by:
isEmptyin interfacejava.util.Map<java.lang.String,java.lang.Object>- Returns:
- true if the map is empty
- See Also:
Map.isEmpty()
-
keySet
public java.util.Set<java.lang.String> keySet()
Gets a Set of the property keys in the property map- Specified by:
keySetin interfacejava.util.Map<java.lang.String,java.lang.Object>- Returns:
- the Set of property keys
- See Also:
Map.keySet()
-
put
public java.lang.Object put(java.lang.String key, java.lang.Object value)Adds the specified key and value to the properties map- Specified by:
putin interfacejava.util.Map<java.lang.String,java.lang.Object>- Parameters:
key- the key associated with the propertyvalue- the property value- See Also:
Map.put(java.lang.Object, java.lang.Object)
-
putAll
public void putAll(java.util.Map<? extends java.lang.String,? extends java.lang.Object> properties)
Adds the properties in the specified map to the properties map- Specified by:
putAllin interfacejava.util.Map<java.lang.String,java.lang.Object>- Parameters:
properties- the map of properties to set- See Also:
Map.putAll(java.util.Map)
-
remove
public java.lang.Object remove(java.lang.Object key)
Removes the property associated with the specified key from the properties map.- Specified by:
removein interfacejava.util.Map<java.lang.String,java.lang.Object>- Parameters:
key- the key associated with the property being removed- See Also:
Map.remove(java.lang.Object)
-
size
public int size()
Gets the number of properties in the properties map.- Specified by:
sizein interfacejava.util.Map<java.lang.String,java.lang.Object>- Returns:
- the number of properties
- See Also:
Map.size()
-
values
public java.util.Collection<java.lang.Object> values()
Gets the values of properties in the properties map.- Specified by:
valuesin interfacejava.util.Map<java.lang.String,java.lang.Object>- Returns:
- a collection of the property values
- See Also:
Map.values()
-
equals
public boolean equals(java.lang.Object o)
- Specified by:
equalsin interfacejava.util.Map<java.lang.String,java.lang.Object>- Overrides:
equalsin classjava.lang.Object- See Also:
Object.equals(java.lang.Object)
-
hashCode
public int hashCode()
- Specified by:
hashCodein interfacejava.util.Map<java.lang.String,java.lang.Object>- Overrides:
hashCodein classjava.lang.Object- See Also:
Object.hashCode()
-
-