Package javax.management

Examples of javax.management.ReflectionException


            typedArgs[p] = argValue;
         }
         catch(ClassNotFoundException e)
         {
            log.trace("Failed to load class for arg"+p, e);
            throw new ReflectionException(e, "Failed to load class for arg"+p);
         }
         catch(java.beans.IntrospectionException e)
         {
            // If the type is not java.lang.Object throw an exception
            if( argTypes[p].equals("java.lang.Object") == false )
View Full Code Here


   {
      if( params == null || params.length != 1 ||
         (params[0] instanceof Invocation) == false )
      {
         NoSuchMethodException e = new NoSuchMethodException(actionName);
         throw new ReflectionException(e, actionName);
      }

      Invocation invocation = (Invocation) params[0];
      try
      {
         Object value = invoke(invocation);
         return value;
      }
      catch(Exception e)
      {
         throw new ReflectionException(e, "Invoke failure");
      }
   }
View Full Code Here

        }
        // Check for a recognized operation name and call the corresponding operation
        if (operationName.equals("loadConfiguration")) {
            return loadConfiguration((String) params[0]);
        } else {
            throw new ReflectionException(
            new NoSuchMethodException(operationName),
            "Cannot find the operation "
            + operationName
            + " in "
            + dClassName);
View Full Code Here

        if (operationName.equals("reloadConfiguration")) {
            reloadConfiguration();
        } else if (operationName.equals("saveConfiguration")) {
            saveConfiguration();
        } else {
            throw new ReflectionException(
            new NoSuchMethodException(operationName),
            "Cannot find the operation "
            + operationName
            + " in "
            + dClassName);
View Full Code Here

    Object value = _injectManager.getReference(_bean, _bean.getBeanClass(), env);
   
    try {
      return method.invoke(value);
    } catch (IllegalAccessException e) {
      throw new ReflectionException(e);
    } catch (InvocationTargetException e) {
      throw new ReflectionException((Exception) e.getCause());
    }
  }
View Full Code Here

        try {
            return kernel.getAttribute(objectName, attributeName);
        } catch (NoSuchAttributeException e) {
            throw new AttributeNotFoundException(attributeName);
        } catch (Exception e) {
            throw new ReflectionException(e);
        }
    }
View Full Code Here

        try {
            kernel.setAttribute(objectName, attributeName, attributeValue);
        } catch (NoSuchAttributeException e) {
            throw new AttributeNotFoundException(attributeName);
        } catch (Exception e) {
            throw new ReflectionException(e);
        }
    }
View Full Code Here

    public Object invoke(String operationName, Object[] arguments, String[] types) throws ReflectionException {
        try {
            return kernel.invoke(objectName, operationName, arguments, types);
        } catch (NoSuchOperationException e) {
            throw new ReflectionException(new NoSuchMethodException(new GOperationSignature(operationName, types).toString()));
        } catch (Exception e) {
            throw new ReflectionException(e);
        }
    }
View Full Code Here

            throw new RuntimeOperationsException(x);
         }
      }
      else
      {
         throw new ReflectionException(new NoSuchMethodException("Operation " + method + " does not belong to the management interface"));
      }
   }
View Full Code Here

      {
         return m.invoke(metadata.mbean, args);
      }
      catch (IllegalAccessException x)
      {
         throw new ReflectionException(x);
      }
      catch (InvocationTargetException x)
      {
         Throwable t = x.getTargetException();
         if (t instanceof Error) throw new RuntimeErrorException((Error)t);
View Full Code Here

TOP

Related Classes of javax.management.ReflectionException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.