Package javax.management

Examples of javax.management.ReflectionException


        try {
            kernel.setAttribute(abstractName, attributeName, attributeValue);
        } catch (NoSuchAttributeException e) {
            throw (AttributeNotFoundException)new AttributeNotFoundException(attributeName).initCause(e);
        } 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(abstractName, operationName, arguments, types);
        } catch (NoSuchOperationException e) {
            throw new ReflectionException((NoSuchMethodException)new NoSuchMethodException(new GOperationSignature(operationName, types).toString()).initCause(e));
        } catch (Exception e) {
            throw new ReflectionException(e);
        }
    }
View Full Code Here

    Method method = getGetter(attribute);
    if (method == null) throw new AttributeNotFoundException(attribute + "@" + name);
    try {
      return method.invoke(o, new Object[0]);
    } catch (Exception e) {
      throw new ReflectionException(e,attribute + "@" + name);
    }
  }
View Full Code Here

    Method method = getSetter(attribute.getName());
    if (method == null) throw new AttributeNotFoundException(attribute + "@" + name);
    try {
      method.invoke(o, new Object[] { attribute.getValue() } );
    } catch (Exception e) {
      throw new ReflectionException(e,attribute + "@" + name);
    }

  }
View Full Code Here

    //if (method == null) throw new ReflectionException("" + actionName + "@" + name);
   
    try {
      return method.invoke(o, params);
    } catch (Exception e) {
      throw new ReflectionException(e,actionName + "@" + name);
    }
   
  }
View Full Code Here

        if ( operationName.equals( OP_START_INTERNAL_MBEANS ) ) {
             startInternalMBeans();
        } else if ( operationName.equals( OP_STOP_INTERNAL_MBEANS ) ) {
            stopInternalMBeans();
        } else {
            throw new ReflectionException( new NoSuchMethodException( operationName ),
                                           "Cannot find the operation " + operationName );
        }
        return null;
    }
View Full Code Here

            } catch (NoSuchAttributeException e) {
                // ignored - caller will simply find no value
            } catch (GBeanNotFoundException e) {
                throw new InstanceNotFoundException(name.getCanonicalName());
            } catch (InternalKernelException e) {
                throw new ReflectionException(unwrapInternalKernelException(e));
            } catch (Exception e) {
                // ignored - caller will simply find no value
            }
        }
        return attributeList;
View Full Code Here

        try {
            gbeanInfo = kernel.getGBeanInfo(name);
        } catch (GBeanNotFoundException e) {
            throw new InstanceNotFoundException(name.toString());
        } catch (InternalKernelException e) {
            throw new ReflectionException(unwrapInternalKernelException(e));
        }
        return JMXUtil.toMBeanInfo(gbeanInfo);
    }
View Full Code Here

    public Object invoke(ObjectName name, String operationName, Object[] params, String[] signature) throws InstanceNotFoundException, MBeanException, ReflectionException {
        try {
            return kernel.invoke(name, operationName, params, signature);
        } catch (NoSuchOperationException e) {
            throw new ReflectionException(new NoSuchMethodException(e.getMessage()));
        } catch (GBeanNotFoundException e) {
            if(name.equals(e.getGBeanName())) {
                throw new InstanceNotFoundException(name.getCanonicalName());
            }
            throw new MBeanException(e);
View Full Code Here

            } catch (NoSuchAttributeException e) {
                // ignored - caller will see value was not set because this attribute will not be in the attribute list
            } catch (GBeanNotFoundException e) {
                throw new InstanceNotFoundException(name.getCanonicalName());
            } catch (InternalKernelException e) {
                throw new ReflectionException(unwrapInternalKernelException(e));
            } catch (Exception e) {
                // ignored - caller will see value was not set because this attribute will not be in the attribute list
            }
        }
        return set;
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.