Package com.ibm.mq.jms
Class MQRoot
java.lang.Object
com.ibm.mq.jms.MQRoot
- All Implemented Interfaces:
JmsPropertyContext,JmsReadablePropertyContext,Serializable,Map<String,Object>
- Direct Known Subclasses:
MQConnection,MQConnectionMetaData,MQMessageConsumer,MQMessageProducer,MQQueueBrowser,MQSession
This is a root object for all the objects in the package com.ibm.mq.jms; it provides a common
point to implement the
JmsPropertyContext
interface.
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:
-
Nested Class Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoidclear()Clears all propertiesbooleancontainsKey(Object key) Ascertains whether the specified key exists in the properties mapbooleancontainsValue(Object value) Ascertains whether the specified value exists in the properties mapentrySet()The entry set of the properties mapbooleanGets the property associated with the specified keybooleangetBooleanProperty(String name) Gets the boolean property value with the given name.bytegetByteProperty(String name) Gets the byte property value with the given name.byte[]getBytesProperty(String name) Gets the bytes property value with the given name.chargetCharProperty(String name) Gets the char property value with the given name.doublegetDoubleProperty(String name) Gets the double property value with the given name.floatgetFloatProperty(String name) Gets the float property value with the given name.intgetIntProperty(String name) Gets the int property value with the given name.longgetLongProperty(String name) Gets the long property value with the given name.getObjectProperty(String name) Gets the Object property value with the given name.Gets all properties which have been set on a resource.shortgetShortProperty(String name) Gets the short property value with the given name.getStringProperty(String name) Gets the String property value with the given name.inthashCode()booleanisEmpty()Indicates whether the properties map is emptykeySet()Gets a Set of the property keys in the property mapbooleanpropertyExists(String name) Indicates whether a named property exists.Adds the specified key and value to the properties mapvoidAdds the properties in the specified map to the properties mapRemoves the property associated with the specified key from the properties map.voidsetBatchProperties(Map<String, Object> properties) Sets multiple property values passed in via a HashMap.voidsetBooleanProperty(String name, boolean value) Sets a Boolean property value with the given name.voidsetByteProperty(String name, byte value) Sets a byte property value with the given name.voidsetBytesProperty(String name, byte[] value) Sets a bytes property value with the given name.voidsetCharProperty(String name, char value) Sets a char property value with the given name.voidsetDoubleProperty(String name, double value) Sets a double property value with the given name.voidsetFloatProperty(String name, float value) Sets a float property value with the given name.voidsetIntProperty(String name, int value) Sets an int property value with the given name.voidsetLongProperty(String name, long value) Sets a long property value with the given name.voidsetObjectProperty(String name, Object value) Sets an Object property value with the given name.voidsetShortProperty(String name, short value) Sets a short property value with the given name.voidsetStringProperty(String name, String value) Sets a String property value with the given name.intsize()Gets the number of properties in the properties map.values()Gets the values of properties in the properties map.Methods inherited from class java.lang.Object
getClass, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.ibm.msg.client.jms.JmsPropertyContext
toJsonMethods inherited from interface com.ibm.msg.client.jms.JmsReadablePropertyContext
stringifyMeMethods inherited from interface java.util.Map
compute, computeIfAbsent, computeIfPresent, forEach, getOrDefault, merge, putIfAbsent, remove, replace, replace, replaceAll
-
Method Details
-
setBatchProperties
Sets 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
Sets 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
Sets 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
Sets 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
Sets 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
Sets 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
Sets 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
Sets 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
Sets 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
Sets 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
Sets 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
Sets 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
Gets 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- if the value of the property is null or if the value can not be converted to Boolean type.
-
getByteProperty
Gets 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- if the value of the property is null or if the value can not be converted to Byte type.
-
getBytesProperty
Gets 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- if the value of the property is null.
-
getCharProperty
Gets 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- if the value of the property is null or if the value can not be converted to Character type.
-
getDoubleProperty
Gets 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- if the value of the property is null or if the value can not be converted to Double type.
-
getFloatProperty
Gets 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- if the value of the property is null or if the value can not be converted to Float type.
-
getIntProperty
Gets 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- if the value of the property is null or if the value can not be converted to Integer type.
-
getLongProperty
Gets 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- if the value of the property is null or if the value can not be converted to long type.
-
getObjectProperty
Gets 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- if the value of the property is null.
-
getPropertyNames
Gets all properties which have been set on a resource.- Specified by:
getPropertyNamesin interfaceJmsReadablePropertyContext- Returns:
- the Enumeration of all set properties.
- Throws:
javax.jms.JMSException- if an error occurs while enumerating property names.
-
getShortProperty
Gets 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- if the value of the property is null or if the value can not be converted to Short type.
-
getStringProperty
Gets 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- if the value of the property is null or if the value can not be converted to String type.
-
propertyExists
Indicates 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- if the name of the property is null.
-
clear
public void clear()Clears all properties -
containsKey
Ascertains whether the specified key exists in the properties map- Specified by:
containsKeyin interfaceMap<String,Object> - Parameters:
key- key to check- Returns:
- boolean to indicate if the key exists
- See Also:
-
containsValue
Ascertains whether the specified value exists in the properties map- Specified by:
containsValuein interfaceMap<String,Object> - Parameters:
value- value to check- Returns:
- boolean to indicate if the value exists
- See Also:
-
entrySet
The entry set of the properties map -
get
Gets the property associated with the specified key -
isEmpty
public boolean isEmpty()Indicates whether the properties map is empty -
keySet
Gets a Set of the property keys in the property map -
put
Adds the specified key and value to the properties map -
putAll
Adds the properties in the specified map to the properties map -
remove
Removes the property associated with the specified key from the properties map. -
size
public int size()Gets the number of properties in the properties map. -
values
Gets the values of properties in the properties map. -
equals
-
hashCode
public int hashCode()
-