Data types

In the example for the MBeanServer invoke() method in the previous subsection, the input parameter String[] signature represents the data types of all input parameters to the method being invoked.

In order to ensure compliance with the OpenMBean model, we only use the approved data types for our attribute getter() and setter() methods and for operation parameters. The data types specified when invoke() is called are therefore always limited to a set of approved types as follows:
  • Simple data types:
    • java.lang.Void
    • java.lang.Boolean
    • java.lang.Byte
    • java.lang.Character
    • java.lang.String
    • java.lang.Short
    • java.lang.Integer
    • java.lang.Long
    • java.lang.Float
    • java.lang.Double
  • Arrays of the above types:
    • javax.management.ObjectName
    • javax.management.openmbean.CompositeData
    • javax.management.openmbean.TabularData
The class name literals for each type have a specific format as follows:
  • The simple data types listed above are returned as described, for example "java.lang.Byte"
  • For arrays of these types, the situation is more complex. For the purpose of the MQe JMX types, the only array types are of types java.lang.String and java.lang.Short. These array types are defined as follows:
    Table 1. Data Types and Class Name Literal Strings
    Data Type Class Name Literal String
    String[] "[Ljava.lang.String;"
    Short[] "[Ljava.lang.Short;"
    Note: Notice the semi-colon as the end of the class name. In all contexts where a data type has to be specified throughout the JMX instrumentation and agent layers, the class name literal format must be used.

Terms of use | WebSphere software

(c) Copyright IBM Corporation 2004, 2005. All rights reserved.