Examples of MBeanInvoker


Examples of org.jboss.mx.server.MBeanInvoker

/*  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()))))
/*     */           {
/* 127 */             MBeanInvoker invoker = invocation.getInvoker();
/* 128 */             return invoker.invoke(setMethodString, new Object[] { args[0] }, new String[] { invocation.getAttributeType() });
/*     */           }
/*     */         }
/*     */       }
/* 132 */       if (target == null)
/* 133 */         throw new MBeanException(new ServiceNotFoundException("No Target"));
View Full Code Here

Examples of org.jboss.mx.server.MBeanInvoker

/*    */   }
/*    */
/*    */   public Object invoke(Invocation invocation)
/*    */     throws Throwable
/*    */   {
/* 55 */     MBeanInvoker invoker = invocation.getInvoker();
/* 56 */     return invoker.getMetaData();
/*    */   }
View Full Code Here

Examples of org.jboss.mx.server.MBeanInvoker

/*  83 */     if (policy == null) {
/*  84 */       policy = this.mbeanPersistencePolicy;
/*     */     }
/*  86 */     if (policy.equalsIgnoreCase("OnUpdate") == true)
/*     */     {
/*  88 */       MBeanInvoker invoker = invocation.getInvoker();
/*  89 */       Descriptor attrDesc = invocation.getDescriptor();
/*  90 */       invoker.updateAttributeInfo(attrDesc);
/*  91 */       this.callback.store();
/*     */     }
/*  93 */     else if (policy.equalsIgnoreCase("NoMoreOftenThan") == true)
/*     */     {
/*  95 */       PersistenceTimerTask task = (PersistenceTimerTask)this.timerTaskMap.get(attrName);
View Full Code Here

Examples of org.jboss.mx.server.MBeanInvoker

/*     */   }
/*     */
/*     */   private synchronized void lazyInit(Invocation invocation)
/*     */     throws MBeanException
/*     */   {
/* 109 */     MBeanInvoker invoker = invocation.getInvoker();
/* 110 */     this.callback = ((PersistentMBean)invocation.getInvoker());
/* 111 */     ModelMBeanInfo info = (ModelMBeanInfo)invoker.getMetaData();
/* 112 */     Descriptor mbeanDesc = info.getMBeanDescriptor();
/*     */
/* 114 */     String policy = (String)mbeanDesc.getFieldValue("persistPolicy");
/* 115 */     String persistPeriod = (String)mbeanDesc.getFieldValue("persistPeriod");
/*     */
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.