public Object invoke( ObjectName name,
String operationName,
Object[] params,
String[] signature)
throws InstanceNotFoundException,
MBeanException,
ReflectionException;
This method is used to invoke JMX-wrappered MQe operations on MQe JMX-instrumented
resources.
The input parameters are:
- name
- the ObjectName corresponding to the MQe resource to be administered.
- operationName
- the name of the operation to be invoked, for example: addAlias.
- params
- an array representing the input parameters to the operation.
- signature
- an array representing the data types corresponding to each parameter.
Note: The indices for entries in params and signature must
correspond: the entry at index j in signature must represent the data type
of the entry at index j in params.
Suppose you want to invoke the addAlias() method on a MQe queue represented
by object name queueObjName where there is one input parameter of type String,
which represents the alias name. The following example shows how to do this:
Object[] params = {new String("myAlias")};
String[] signature = {new String("java.lang.String")};
mbeanServer.invoke(queueObjName, "addAlias", params, signature);
In
this case, there is no return value to worry about. However, although this
is a relatively simple example, it illustrates the principles which apply
to all operations invoked using this method.