Examples of Mbean


Examples of org.infinispan.jmx.annotations.MBean

   public boolean isManagedResource() {
      return !atts.isEmpty() || !ops.isEmpty();
   }

   public String getObjectName() {
      MBean mBean = obj.getClass().getAnnotation(MBean.class);
      if (mBean != null && mBean.objectName() != null && mBean.objectName().trim().length() > 0) {
         return mBean.objectName();
      }
      return obj.getClass().getSimpleName();
   }
View Full Code Here

Examples of org.infinispan.jmx.annotations.MBean

   Object getObject() {
      return obj;
   }

   private synchronized void findDescription() {
      MBean mbean = getObject().getClass().getAnnotation(MBean.class);
      if (mbean != null && mbean.description() != null && mbean.description().trim().length() > 0) {
         description = mbean.description();
         if (log.isDebugEnabled()) {
            log.debugf("@MBean description set - %s", mbean.description());
         }
         MBeanAttributeInfo info = new MBeanAttributeInfo(MBEAN_DESCRITION, "java.lang.String",
                 "@MBean description", true, false, false);
         try {
            atts.put(MBEAN_DESCRITION, new FieldAttributeEntry(info, getClass().getDeclaredField(
View Full Code Here

Examples of org.jboss.cache.jmx.annotations.MBean

      return obj;
   }

   private void findDescription()
   {
      MBean mbean = getObject().getClass().getAnnotation(MBean.class);
      if (mbean != null && mbean.description() != null && mbean.description().trim().length() > 0)
      {
         description = mbean.description();
         if (log.isDebugEnabled())
         {
            log.debug("@MBean description set - " + mbean.description());
         }
         MBeanAttributeInfo info = new MBeanAttributeInfo(MBEAN_DESCRITION,
               "java.lang.String",
               "@MBean description",
               true,
View Full Code Here

Examples of org.jboss.cache.jmx.annotations.MBean

      return !atts.isEmpty() || !ops.isEmpty();
   }

   public String getObjectName()
   {
      MBean mBean = obj.getClass().getAnnotation(MBean.class);
      if (mBean != null && mBean.objectName() != null && mBean.objectName().trim().length() > 0)
      {
         return mBean.objectName();
      }
      return obj.getClass().getSimpleName();
   }
View Full Code Here

Examples of org.jgroups.annotations.MBean

    Object getObject() {
        return obj;
    }

    private void findDescription() {
        MBean mbean=getObject().getClass().getAnnotation(MBean.class);
        if(mbean != null && mbean.description() != null && mbean.description().trim().length() > 0) {
            description=mbean.description();
            if(log.isDebugEnabled()) {
                log.debug("@MBean description set - " + mbean.description());
            }
            MBeanAttributeInfo info=new MBeanAttributeInfo(ResourceDMBean.MBEAN_DESCRITION,
                                                           "java.lang.String",
                                                           "@MBean description",
                                                           true,
View Full Code Here

Examples of org.jgroups.annotations.MBean

            throw new MBeanRegistrationException(e);
        }
    }

    private static ObjectName getObjectName(Object obj, String name) throws MalformedObjectNameException {
        MBean resource=obj.getClass().getAnnotation(MBean.class);
        if(name != null && name.length() > 0) {
            return new ObjectName(name);
        }
        else if(resource.objectName() != null && resource.objectName().length() > 0) {
            return new ObjectName(resource.objectName());
        }
        else {
            throw new MalformedObjectNameException("Instance " + obj
                                                   + " of a class "
                                                   + obj.getClass()
View Full Code Here

Examples of org.jgroups.annotations.MBean

            throw new MBeanRegistrationException(e);
        }
    }

    private static ObjectName getObjectName(Object obj, String name) throws MalformedObjectNameException {
        MBean resource = obj.getClass().getAnnotation(MBean.class);
        if (name != null && !name.isEmpty()) {
            return new ObjectName(name);
        } else if (resource.objectName() != null && !resource.objectName().isEmpty()) {
            return new ObjectName(resource.objectName());
        } else {
            throw new MalformedObjectNameException(obj + " of class " + obj.getClass() + " has an invalid object name");
        }
    }
View Full Code Here

Examples of org.jgroups.annotations.MBean

            throw new MBeanRegistrationException(e);
        }
    }

    private static ObjectName getObjectName(Object obj, String name) throws MalformedObjectNameException {
        MBean resource = obj.getClass().getAnnotation(MBean.class);
        if (name != null && name.length() > 0) {
            return new ObjectName(name);
        } else if (resource.objectName() != null && resource.objectName().length() > 0) {
            return new ObjectName(resource.objectName());
        } else {
            throw new MalformedObjectNameException(obj + " of class " + obj.getClass() + " has an invalid object name");
        }
    }
View Full Code Here

Examples of org.jgroups.annotations.MBean

    Object getObject() {
        return obj;
    }

    private void findDescription() {
        MBean mbean=getObject().getClass().getAnnotation(MBean.class);
        if(mbean != null && mbean.description() != null && mbean.description().trim().length() > 0) {
            description=mbean.description();
            MBeanAttributeInfo info=new MBeanAttributeInfo(ResourceDMBean.MBEAN_DESCRITION,
                                                           "java.lang.String",
                                                           "MBean description",
                                                           true,
                                                           false,
View Full Code Here

Examples of org.jgroups.annotations.MBean

            throw new MBeanRegistrationException(e);
        }
    }

    private static ObjectName getObjectName(Object obj, String name) throws MalformedObjectNameException {
        MBean resource = obj.getClass().getAnnotation(MBean.class);
        if (name != null && name.length() > 0) {
            return new ObjectName(name);
        } else if (resource.objectName() != null && resource.objectName().length() > 0) {
            return new ObjectName(resource.objectName());
        } else {
            throw new MalformedObjectNameException(obj + " of class " + obj.getClass() + " has an invalid object name");
        }
    }
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.