| |
|
| java.lang.Object org.jboss.mx.util.ObjectNameConverter
ObjectNameConverter | public class ObjectNameConverter (Code) | | Converts forbidden characters in the key and value of an object name
to valid characters and back.
Character Conversion Table: (based on RFC 1738 style escapes
'%' => '%25'
'*' => '%2a'
',' => '%2c'
':' => '%3a'
'?' => '%3f'
'=' => '%3d'
'\'' => '%27'
'\"' => '%22'
Thanx to William Hoyle for mention this
Attention:When you have a comma in one of your property
value then you have to use a Hashtable to provide the properties
otherwise the property parsing will fail.
author: Andreas Schaefer author: William Hoyle version: $Revision: 61303 $ |
convert | public static ObjectName convert(String pObjectName) throws MalformedObjectNameException(Code) | | Parses the given Object Name String representation and
replaces any invalid characters in property keays and values with
valid characters.
Attention: Do not use this method when a property
key or value contain a comma because then the parsing will fail.
Please use the
ObjectNameConverter.convert(java.lang.String,java.util.Hashtable)convert( String, Hashtable ) instead because the properties
are already parsed (by you).
Parameters: pObjectName - String representing an Object Name which mustnot contain a comman inside a property value Created Object Name with the converted keys and valuesof the given Object Name throws: javax.management.MalformedObjectNameException - If the given Object Nameis not correct |
convertCharacters | public static String convertCharacters(String pValue, boolean pEncrypt)(Code) | | Encrypt or decrypt the forbidden characters in an Object Name value property
Parameters: pValue - Property Value of the Object Name's property list to be en- or decrypted Parameters: pEncrypt - True if the value must be encrypted otherwise decrypted A en- or decrypted String according to the conversion table above |
getProperties | public static Hashtable getProperties(ObjectName pObjectName)(Code) | | Takes the properties from the given Object Name and convert
special characters back
Parameters: pObjectName - Given Object Name Hashtable with the back converted properties in itand will contain a "*" as key if the given objectname is a property pattern for queries. |
getString | public static String getString(ObjectName pObjectName)(Code) | | Takes the properties from the given Object Name and convert
special characters back
Parameters: pObjectName - Given Object Name String with the original Object Name String representation andwhen a property pattern Object Name for queries it contains a ",*"at the end. |
|
|
|