public Collection < ObjectName > getObjectNames ( ) throws MalformedObjectNameException { ObjectName mBean = getRequest ( ) . getObjectName ( ) ; if ( mBean . isPattern ( ) ) { // The result value contains the list of fetched object names JSONObject values = getValue ( ) ; Set < ObjectName > ret = new HashSet < ObjectName > ( ) ; for ( Object name : values . keySet ( ) ) { ret . add ( new ObjectName ( ( String ) name ) ) ; } return ret ; } else { return Arrays . asList ( mBean ) ; } }
Get all MBean names for which the request fetched values . If the request contained an MBean pattern then all MBean names matching this pattern and which contained attributes of the given name are returned . If the MBean wasnt a pattern a single value collection with the single MBean name of the request is returned .