Package javax.management

Examples of javax.management.StandardMBean$StandardMBeanSupport


   *        "hadoop:service=NameNode,name=FSNamesystemState"
   */
  private void registerMBean() {
    // We can only implement one MXBean interface, so we keep the old one.
    try {
      StandardMBean bean = new StandardMBean(this, FSNamesystemMBean.class);
      mbeanName = MBeans.register("NameNode", "FSNamesystemState", bean);
    } catch (NotCompliantMBeanException e) {
      throw new RuntimeException("Bad MBean setup", e);
    }

View Full Code Here


   */
  void registerMBean() {
    // We wrap to bypass standard mbean naming convetion.
    // This wraping can be removed in java 6 as it is more flexible in
    // package naming for mbeans and their impl.
    StandardMBean bean;
    try {
      bean = new StandardMBean(this,FSNamesystemMBean.class);
      mbeanName = MBeanUtil.registerMBean("NameNode", "FSNamesystemStatus", bean);
    } catch (NotCompliantMBeanException e) {
      e.printStackTrace();
    }

View Full Code Here

            // a proxy or an interceptor it is not compliant since
            // the naming conventions are not fulfilled.
            // Now we use the StandardMBean class to adapt the MBean to the
            // DynamicMBean interface which is not restricted by these
            // naming conventions
            StandardMBean standardMBean = new StandardMBean(obj, managementInterface);
            instance = _beanServer.registerMBean(standardMBean, objectName);
        }
        _objectInstances.add(instance);
        return instance;
    }
View Full Code Here

        {
            LOGGER.debug("Consulting mbean provider : " + provider + " for child : " + child);
            if (provider.isChildManageableByMBean(child))
            {
                LOGGER.debug("Provider will create mbean ");
                StandardMBean bean = provider.createMBean(child, mbean);
                // TODO track the mbeans that have been created on behalf of a child in a map, then
                // if the child is ever removed, destroy these beans too.
            }
        }
    }
View Full Code Here

        try
        {
            try
            {
                MBeanServer mbs = ManagementFactory.getPlatformMBeanServer();
                mbs.registerMBean(new StandardMBean(new NativeAccess(), NativeAccessMBean.class), new ObjectName(MBEAN_NAME));
            }
            catch (Exception e)
            {
                logger.error("error registering MBean " + MBEAN_NAME, e);
                //Allow the server to start even if the bean can't be registered
View Full Code Here

            // a proxy or an interceptor it is not compliant since
            // the naming conventions are not fulfilled.
            // Now we use the StandardMBean class to adapt the MBean to the
            // DynamicMBean interface which is not restricted by these
            // naming conventions
            StandardMBean standardMBean = new StandardMBean(obj, managementInterface);
            instance = _beanServer.registerMBean(standardMBean, objectName);
        }
        _objectInstances.add(instance);
        return instance;
    }
View Full Code Here

            try
            {
               JMSBridgeControlImpl controlBean = new JMSBridgeControlImpl(this);
               this.objectName = ObjectName.getInstance(objectName);
               StandardMBean mbean = new StandardMBean(controlBean, JMSBridgeControl.class);
               mbeanServer.registerMBean(mbean, this.objectName);
               JMSBridgeImpl.log.debug("Registered JMSBridge instance as: " + this.objectName.getCanonicalName());
            }
            catch (Exception e)
            {
View Full Code Here

            @Override
            public String getModuleState() {
                return context.getModule().getState().toString();
            }
        };
        StandardMBean mbean = new StandardMBean(moduleState, ModuleStateB.class);
        server.registerMBean(mbean, getObjectName(context.getModule()));
    }
View Full Code Here

            @Override
            public String getModuleState() {
                return context.getModule().getState().toString();
            }
        };
        StandardMBean mbean = new StandardMBean(moduleState, ModuleStateA.class);
        server.registerMBean(mbean, getObjectName(context.getModule()));
    }
View Full Code Here

   */
  void registerMBean(final String storageId) {
    // We wrap to bypass standard mbean naming convetion.
    // This wraping can be removed in java 6 as it is more flexible in
    // package naming for mbeans and their impl.
    StandardMBean bean;
    String storageName;
    if (storageId == null || storageId.equals("")) {// Temp fix for the uninitialized storage
      storageName = "UndefinedStorageId" + rand.nextInt();
    } else {
      storageName = storageId;
    }
    try {
      bean = new StandardMBean(this,FSDatasetMBean.class);
      mbeanName = MBeanUtil.registerMBean("DataNode", "FSDatasetState-" + storageName, bean);
      versionBeanName = VersionInfo.registerJMX("DataNode");
    } catch (NotCompliantMBeanException e) {
      e.printStackTrace();
    }
View Full Code Here

TOP

Related Classes of javax.management.StandardMBean$StandardMBeanSupport

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.