Package javax.management

Examples of javax.management.DynamicMBean


            throw new MBeanException(e);
        }
        String domain = managed.getDomain();
        if (domain == null)
            domain = mserver.getDefaultDomain();
        DynamicMBean mbean = managed.createMBean(service);
        ObjectName oname = createObjectName(domain, service);
        if( mserver.isRegistered( oname ))  {
            mserver.unregisterMBean(oname);
        }
        mserver.registerMBean(mbean, oname);
View Full Code Here


            throw new MBeanException(e);
        }
        String domain = managed.getDomain();
        if (domain == null)
            domain = mserver.getDefaultDomain();
        DynamicMBean mbean = managed.createMBean(valve);
        ObjectName oname = createObjectName(domain, valve);
        if( mserver.isRegistered( oname ))  {
            mserver.unregisterMBean(oname);
        }
        mserver.registerMBean(mbean, oname);
View Full Code Here

      // typed proxy interface
      mbean.setSomething("Kissa");
      assertTrue(mbean.getSomething().equals("Kissa"));
     
      // detyped proxy interface
      DynamicMBean mbean2 = (DynamicMBean)mbean;
      mbean2.setAttribute(new Attribute("Something", "Koira"));
      assertTrue(mbean2.getAttribute("Something").equals("Koira"));
     
      // direct local server invocation
      server.setAttribute(oname, new Attribute("Something", "Kissa"));
      assertTrue(server.getAttribute(oname, "Something").equals("Kissa"));
           
      // typed proxy interface invocation
      mbean.doOperation();
      assertTrue(mbean.isOperationInvoked());
     
      mbean.reset();
     
      // detyped proxy invocation
      mbean2.invoke("doOperation", null, null);
      assertTrue(((Boolean)mbean2.getAttribute("OperationInvoked")).booleanValue());
     
      mbean2.invoke("reset", null, null);
     
      // direct local server invocation
      server.invoke(oname, "doOperation", null, null);
      assertTrue(((Boolean)server.getAttribute(oname, "OperationInvoked")).booleanValue());
   }
View Full Code Here

     * @param description
     * @return the MBean wrapper
     * @throws JMException
     */
    static DynamicMBean buildStandardMBean(Object theObject, Class interfaceMBean, String description) throws JMException {
        DynamicMBean result = null;
        if (theObject != null) {
            if (theObject instanceof MBeanInfoProvider) {
                MBeanInfoProvider info = (MBeanInfoProvider) theObject;
                result = new BaseStandardMBean(info.getObjectToManage(),interfaceMBean, description, info.getAttributeInfos(), info
                        .getOperationInfos());
View Full Code Here

            throw new MBeanException(e);
        }
        String domain = managed.getDomain();
        if (domain == null)
            domain = mserver.getDefaultDomain();
        DynamicMBean mbean = managed.createMBean(environment);
        ObjectName oname = createObjectName(domain, environment);
        if( mserver.isRegistered( oname ))  {
            mserver.unregisterMBean(oname);
        }
        mserver.registerMBean(mbean, oname);
View Full Code Here

            throw new MBeanException(e);
        }
        String domain = managed.getDomain();
        if (domain == null)
            domain = mserver.getDefaultDomain();
        DynamicMBean mbean = managed.createMBean(resource);
        ObjectName oname = createObjectName(domain, resource);
        if( mserver.isRegistered( oname ))  {
            mserver.unregisterMBean(oname);
        }
        mserver.registerMBean(mbean, oname);
View Full Code Here

            throw new MBeanException(e);
        }
        String domain = managed.getDomain();
        if (domain == null)
            domain = mserver.getDefaultDomain();
        DynamicMBean mbean = managed.createMBean(resourceLink);
        ObjectName oname = createObjectName(domain, resourceLink);
        if( mserver.isRegistered( oname ))  {
            mserver.unregisterMBean(oname);
        }
        mserver.registerMBean(mbean, oname);
View Full Code Here

            throw new MBeanException(e);
        }
        String domain = managed.getDomain();
        if (domain == null)
            domain = mserver.getDefaultDomain();
        DynamicMBean mbean = managed.createMBean(group);
        ObjectName oname = createObjectName(domain, group);
        if( mserver.isRegistered( oname ))  {
            mserver.unregisterMBean(oname);
        }
        mserver.registerMBean(mbean, oname);
View Full Code Here

            throw new MBeanException(e);
        }
        String domain = managed.getDomain();
        if (domain == null)
            domain = mserver.getDefaultDomain();
        DynamicMBean mbean = managed.createMBean(loader);
        ObjectName oname = createObjectName(domain, loader);
        if( mserver.isRegistered( oname ))  {
            // side effect: stop it
            mserver.unregisterMBean( oname );
        }
View Full Code Here

            throw new MBeanException(e);
        }
        String domain = managed.getDomain();
        if (domain == null)
            domain = mserver.getDefaultDomain();
        DynamicMBean mbean = managed.createMBean(factory);
        ObjectName oname = createObjectName(domain, factory);
        if( mserver.isRegistered(oname )) {
            mserver.unregisterMBean(oname);
        }
        mserver.registerMBean(mbean, oname);
View Full Code Here

TOP

Related Classes of javax.management.DynamicMBean

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.