* @param params the method parameters
* @param signature the method signature.
*/
public Object invoke (String actionName, Object[] params, String[] signature) throws MBeanException,ReflectionException
{
OperationHasBeenInvokedNotification notification = null;
try
{
QpidMethod method = _methods.get(actionName);
if (method != null)
{
try
{
method.validate(params);
InvocationResult result = invokeMethod(_objectId, method, params);
notification = new OperationHasBeenInvokedNotification(actionName,params,signature,result);
return result;
} catch (Exception ex)
{
MBeanException exception = new MBeanException(ex);
notification = new OperationHasBeenInvokedNotification(actionName,params,signature,exception);
throw exception;
}
} else
{
ReflectionException exception = new ReflectionException(new NoSuchMethodException(actionName));
notification = new OperationHasBeenInvokedNotification(actionName,params,signature,exception);
throw exception;
}
} finally
{
sendNotification(notification);