Package javax.management

Examples of javax.management.InvalidAttributeValueException


/*      */
/*      */   public void setAttribute(Attribute attribute)
/*      */     throws AttributeNotFoundException, InvalidAttributeValueException, MBeanException, ReflectionException
/*      */   {
/*  418 */     if (attribute == null) {
/*  419 */       throw new InvalidAttributeValueException("null attribute");
/*      */     }
/*      */
/*  422 */     String name = attribute.getName();
/*  423 */     InvocationContext ctx = (InvocationContext)this.attributeContextMap.get(name);
/*      */
View Full Code Here


/* 223 */       throw new RuntimeErrorException((Error)t, "Error in MBean when setting attribute '" + attribute.getName() + "'");
/*     */     }
/*     */     catch (IllegalArgumentException e)
/*     */     {
/* 228 */       String valueType = null == attribute.getValue() ? "<null value>" : attribute.getValue().getClass().getName();
/* 229 */       throw new InvalidAttributeValueException("Attribute value mismatch while setting '" + attribute.getName() + "': " + valueType);
/*     */     }
/*     */     catch (Exception e)
/*     */     {
/* 233 */       throw new ReflectionException(e, "Exception in AttributeProvider for setting '" + attribute.getName() + "'");
/*     */     }
View Full Code Here

/*     */   }
/*     */
/*     */   protected void checkAssignable(String context, Class clazz, Object value) throws InvalidAttributeValueException, ClassNotFoundException
/*     */   {
/* 158 */     if ((value != null) && (!clazz.isAssignableFrom(value.getClass())))
/* 159 */       throw new InvalidAttributeValueException(context + " has class " + value.getClass() + " loaded from " + value.getClass().getClassLoader() + " that is not assignable to attribute class " + clazz + " loaded from " + clazz.getClassLoader());
/*     */   }
View Full Code Here

/*     */       {
/* 647 */         Object value = attribute.getValue();
/* 648 */         if ((value instanceof Boolean))
/* 649 */           this.asynchronous = ((Boolean)value).booleanValue();
/*     */         else
/* 651 */           throw new InvalidAttributeValueException("Attribute is of boolean type");
/*     */       }
/*     */       else {
/* 654 */         throw new AttributeNotFoundException(attrName + " is not a known attribute");
/*     */       }
/*     */     }
View Full Code Here

    {
        if (setter == null) {
            throw new AttributeNotFoundException(name + " is read-only");
        }
        if (!ReflectionUtils.isAssignable(value, setter.getParameterTypes()[0])) {
            throw new InvalidAttributeValueException("Can not assign " + value.getClass() + " to attribute " + name);
        }
        invoke(target, setter, value);
    }
View Full Code Here

TOP

Related Classes of javax.management.InvalidAttributeValueException

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.