Package javax.management.modelmbean

Examples of javax.management.modelmbean.InvalidTargetObjectTypeException


/*  77 */           Object descriptorTarget = d.getFieldValue("targetObject");
/*  78 */           if (descriptorTarget != null)
/*     */           {
/*  80 */             String targetType = (String)d.getFieldValue("targetType");
/*  81 */             if (!"ObjectReference".equalsIgnoreCase(targetType))
/*  82 */               throw new InvalidTargetObjectTypeException("Target type is " + targetType);
/*  83 */             target = descriptorTarget;
/*     */           }
/*  85 */           String getMethodString = (String)d.getFieldValue("getMethod");
/*  86 */           if ((getMethodString != null) && ((getMethod == null) || (!getMethodString.equals(getMethod.getName()))))
/*     */           {
/*  88 */             MBeanInvoker invoker = invocation.getInvoker();
/*  89 */             Object object = invoker.invoke(getMethodString, new Object[0], new String[0]);
/*  90 */             checkAssignable(getMethodString, invocation.getAttributeTypeClass(), object);
/*  91 */             return object;
/*     */           }
/*     */         }
/*     */       }
/*  95 */       if (target == null)
/*  96 */         throw new MBeanException(new ServiceNotFoundException("No Target"));
/*     */       try
/*     */       {
/*  99 */         value = getMethod.invoke(target, args);
/*     */       }
/*     */       catch (Throwable t)
/*     */       {
/* 103 */         handleInvocationExceptions(t);
/* 104 */         return null;
/*     */       }
/*     */
/*     */     }
/*     */     else
/*     */     {
/* 110 */       Method setMethod = this.setter;
/* 111 */       if (this.dynamic)
/*     */       {
/* 113 */         Descriptor d = invocation.getDescriptor();
/* 114 */         if (d != null)
/*     */         {
/* 116 */           Object descriptorTarget = d.getFieldValue("targetObject");
/* 117 */           if (descriptorTarget != null)
/*     */           {
/* 119 */             String targetType = (String)d.getFieldValue("targetType");
/* 120 */             if (!"ObjectReference".equalsIgnoreCase(targetType))
/* 121 */               throw new InvalidTargetObjectTypeException("Target type is " + targetType);
/* 122 */             target = descriptorTarget;
/*     */           }
/* 124 */           String setMethodString = (String)d.getFieldValue("setMethod");
/* 125 */           if ((setMethodString != null) && ((setMethod == null) || (!setMethodString.equals(setMethod.getName()))))
/*     */           {
View Full Code Here


/*     */
/*     */   public void setManagedResource(Object ref, String resourceType)
/*     */     throws MBeanException, InstanceNotFoundException, InvalidTargetObjectTypeException
/*     */   {
/* 206 */     if (!isSupportedResourceType(ref, resourceType)) {
/* 207 */       throw new InvalidTargetObjectTypeException("Unsupported resource type: " + resourceType);
/*     */     }
/* 209 */     setResource(ref);
/* 210 */     this.resourceType = resourceType;
/*     */
/* 212 */     if (getServer() != null)
View Full Code Here

/*  98 */         Object descriptorTarget = descriptor.getFieldValue("targetObject");
/*  99 */         if (descriptorTarget != null)
/*     */         {
/* 101 */           String targetType = (String)descriptor.getFieldValue("targetType");
/* 102 */           if (!"ObjectReference".equalsIgnoreCase(targetType))
/* 103 */             throw new InvalidTargetObjectTypeException("Target type is " + targetType);
/* 104 */           target = descriptorTarget;
/*     */
/* 107 */           Class clazz = null;
/* 108 */           String className = (String)descriptor.getFieldValue("class");
/* 109 */           if (className == null)
View Full Code Here

            return;
        }
       
        log.debug("setManagedResource");
        if (!"objectreference".equalsIgnoreCase(type))
            throw new InvalidTargetObjectTypeException(type);

        if (_object==null)
        {
            // first set so define attributes etc.
            _object=proxyObject;
View Full Code Here

TOP

Related Classes of javax.management.modelmbean.InvalidTargetObjectTypeException

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.