Package javax.management

Examples of javax.management.InvalidAttributeValueException


   }
  
   protected void checkAssignable(String context, Class clazz, Object value) throws InvalidAttributeValueException, ClassNotFoundException
   {
      if (value != null && clazz.isAssignableFrom(value.getClass()) == false)
         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


   }
  
   protected void checkAssignable(String context, Class clazz, Object value) throws InvalidAttributeValueException, ClassNotFoundException
   {
      if (value != null && clazz.isAssignableFrom(value.getClass()) == false)
         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

   }
  
   protected void checkAssignable(String context, Class clazz, Object value) throws InvalidAttributeValueException, ClassNotFoundException
   {
      if (value != null && clazz.isAssignableFrom(value.getClass()) == false)
         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

      InvalidAttributeValueException, MBeanException, ReflectionException
   {
      // TODO:  __JBOSSMX_INVOCATION

      if (attribute == null)
         throw new InvalidAttributeValueException("null attribute");

      // lookup the server side invocation context
      String name = attribute.getName();
      InvocationContext ctx = (InvocationContext) attributeContextMap.get(name);
View Full Code Here

        return null;
    }

    public void setAttribute(Attribute attribute) throws AttributeNotFoundException,
    InvalidAttributeValueException, MBeanException, ReflectionException {
        throw new InvalidAttributeValueException("Cannot set attribute: " + attribute);
    }
View Full Code Here

    }

    private void checkAssignable(String name, Class clazz, Object value) throws InvalidAttributeValueException {
        if (value == null) {
            if (!String.class.equals(clazz)) {
                throw(new InvalidAttributeValueException("Cannot set attribute " + name + " to null "
                        + " an instance of " + clazz.getName() + " expected."));
            }
        } else {
            Class valueClass = value.getClass();
            if (!clazz.isAssignableFrom(valueClass)) {
                throw(new InvalidAttributeValueException("Cannot set attribute " + name + " to a " + valueClass.getName()
                        + " instance, " + clazz.getName() + " expected."));
            }
        }
    }
View Full Code Here

            equalsIndex = keyValuePair.indexOf("=");
            if (equalsIndex != -1) {
                properties.put(keyValuePair.substring(0, equalsIndex).trim(),
                        keyValuePair.substring(equalsIndex + 1).trim());
            } else {
                throw new InvalidAttributeValueException("Could not find key/value delimiter '=' in property definition: '"
                        + keyValuePair + "'.");
            }
        }
    }
View Full Code Here

                                    "Wrong response type '" + respType + "'");
                            }
                            // throw exception, didn't get
                            // back right attribute type
                            throw new MBeanException(
                              new InvalidAttributeValueException(
                                "Wrong value type received for get attribute"),
                              "An exception occurred while trying to get an " +
                              "attribute value through a RequiredModelMBean");
                        }
                    }
                }
            } else {
                if (tracing) {
                    MODELMBEAN_LOGGER.logp(Level.FINER,
                            RequiredModelMBean.class.getName(), mth,
                            "getMethod failed " + attrName +
                            " not in attributeDescriptor\n");
                }
                throw new MBeanException(new
                    InvalidAttributeValueException(
                    "Unable to resolve attribute value, " +
                    "no getMethod defined in descriptor for attribute"),
                    "An exception occurred while trying to get an "+
                    "attribute value through a RequiredModelMBean");
View Full Code Here

/*     */   }
/*     */
/*     */   protected void checkAssignable(String context, Class clazz, Object value) throws InvalidAttributeValueException, ClassNotFoundException
/*     */   {
/* 149 */     if ((value != null) && (!clazz.isAssignableFrom(value.getClass())))
/* 150 */       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

/*     */   }
/*     */
/*     */   protected void checkAssignable(String context, Class clazz, Object value) throws InvalidAttributeValueException, ClassNotFoundException
/*     */   {
/* 228 */     if ((value != null) && (!clazz.isAssignableFrom(value.getClass())))
/* 229 */       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

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.