Package javax.management

Examples of javax.management.StandardMBean$MBeanInfoSafeAction

In either case, the class Impl must implement the interface Intf.

Standard MBeans based on the naming relationship between implementation and interface classes are of course still available.

This class may also be used to construct MXBeans. The usage is exactly the same as for Standard MBeans except that in the examples above, the {@code false} parameter to the constructor or{@code super(...)} invocation is instead {@code true}.

@since 1.5

   }

   public void testCaching()
      throws Exception
   {
      StandardMBean std = new MyStandardMBean();
      MBeanInfo info = std.getMBeanInfo();
      assertTrue("MBeanInfo should be cached", info == std.getMBeanInfo());
   }
View Full Code Here


      throws Exception
   {
      boolean caught = false;
      try
      {
         new StandardMBean(null, Runnable.class);
      }
      catch (IllegalArgumentException e)
      {
         caught = true;
      }
      assertTrue("Expected IllegalArgumentException for null implementation", caught);

      caught = false;
      try
      {
         new StandardMBean(new MyRunnable(), null);
      }
      catch (NotCompliantMBeanException e)
      {
         caught = true;
      }
View Full Code Here

  {
    if (name.equals(ZOIEADMIN))
    {
      try
      {
        return new StandardMBean(this.getAdminMBean(), ZoieSystemAdminMBean.class);
      } catch (NotCompliantMBeanException e)
      {
        log.info(e);
        return null;
      }
    }
    if (name.equals(ZOIESTATUS))
    {
      try
      {
        return new StandardMBean(new ZoieIndexingStatusAdmin(this), ZoieIndexingStatusAdminMBean.class);
      } catch (NotCompliantMBeanException e)
      {
        log.info(e);
        return null;
      }
View Full Code Here

  {
    if (name.equals(HOURGLASSADMIN))
    {
      try
      {
        return new StandardMBean(new HourglassAdmin(this), HourglassAdminMBean.class);
      } catch (NotCompliantMBeanException e)
      {
        log.info(e);
        return null;
      }
View Full Code Here

        buffer.append("</service-assembly-info-list>");
        return buffer.toString();
    }

    public void afterPropertiesSet() throws Exception {
        deployer.getManagementAgent().register(new StandardMBean(this, AdminCommandsService.class),
                                               deployer.getNamingStrategy().getObjectName(this));
    }
View Full Code Here

    public String getInstallRoot() {
        return installationContext.getInstallRoot();
    }

    public void register() throws JMException {
        deployer.getManagementAgent().register(new StandardMBean(this, InstallerMBean.class), getObjectName());
    }
View Full Code Here

        Dictionary<String, String> props = new Hashtable<String, String>();
        // populate props from the library meta-data
        props.put(NAME, sharedLibraryDesc.getIdentification().getName());
        LOGGER.debug("Registering JBI Shared Library");
        registerService(bundle, SharedLibrary.class.getName(), sl, props);
        getManagementAgent().register(new StandardMBean(sl, SharedLibrary.class), getNamingStrategy().getObjectName(sl));
        // Check pending bundles
        checkPendingInstallers();
        return sl;
    }
View Full Code Here

                        component, props);
        // Now, register the inner component
        if (!wrappedComponents.containsKey(name)) {
            registerService(bundle, javax.jbi.component.Component.class.getName(), innerComponent, props);
        }
        getManagementAgent().register(new StandardMBean(component, Component.class),
                                      getNamingStrategy().getObjectName(component));
        return component;
    }
View Full Code Here

        Dictionary<String, String> props = new Hashtable<String, String>();
        props.put(NAME, serviceAssemblyDesc.getIdentification().getName());
        // register the service assembly in the OSGi registry
        LOGGER.debug("Registering JBI service assembly");
        registerService(bundle, ServiceAssembly.class.getName(), sa, props);
        getManagementAgent().register(new StandardMBean(sa, ServiceAssembly.class), getNamingStrategy().getObjectName(sa));
        return sa;
    }
View Full Code Here

      if (ifc != null) {
        if (!(ifc.isInstance(bean))) {
          throw new NotCompliantMBeanException("Managed bean [" + bean +
              "] has a target class with an MXBean interface but does not expose it in the proxy");
        }
        return new StandardMBean(bean, ifc, true);
      }
      else {
        ifc = JmxUtils.getMBeanInterface(targetClass);
        if (ifc != null) {
          if (!(ifc.isInstance(bean))) {
            throw new NotCompliantMBeanException("Managed bean [" + bean +
                "] has a target class with an MBean interface but does not expose it in the proxy");
          }
          return new StandardMBean(bean, ifc);
        }
      }
    }
    return null;
  }
View Full Code Here

TOP

Related Classes of javax.management.StandardMBean$MBeanInfoSafeAction

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.