Package javax.management

Examples of javax.management.StandardEmitterMBean


   {
      String[] types = { REQUEST_COMMAND };
      MBeanNotificationInfo info = new MBeanNotificationInfo(types, Notification.class.getName(), "A command request event has been emitted by this mbean");
      NotificationBroadcasterSupport emitter = new NotificationBroadcasterSupport(info);

      mbean = new StandardEmitterMBean(this, JMXTestRunnerMBean.class, emitter);
      mbeanServer.registerMBean(mbean, OBJECT_NAME);

      log.fine("JMXTestRunner registered: " + OBJECT_NAME);
   }
View Full Code Here


        return new NotificationBroadcasterSupport(launch, death);
    }

    private void registerMBean(String name, Class<?> mbeanInterface) {
        try {
            final Object mbean = new StandardEmitterMBean(this, (Class) mbeanInterface, emitter);

            final MBeanServer mbs = ManagementFactory.getPlatformMBeanServer();
            final ObjectName mxbeanName = new ObjectName(name);
            mbs.registerMBean(mbean, mxbeanName);
        } catch (InstanceAlreadyExistsException ex) {
View Full Code Here

        // Make DynamicMBean out of MXBean by wrapping it with a StandardMBean
        final DynamicMBean dmbean;
        if (pmo instanceof DynamicMBean) {
            dmbean = DynamicMBean.class.cast(pmo);
        } else if (pmo instanceof NotificationEmitter) {
            dmbean = new StandardEmitterMBean(pmo, null, true, (NotificationEmitter) pmo);
        } else {
            dmbean = new StandardMBean(pmo, null, true);
        }

        try {
View Full Code Here

        //
        final DynamicMBean dmbean;
        if (emitter == null) {
            dmbean = new StandardMBean(mbean, null, true);
        } else {
            dmbean = new StandardEmitterMBean(mbean, null, true, emitter);
        }
        addMBean(mbs, dmbean, mbeanName, false);
    }
View Full Code Here

   {
      String[] types = { REQUEST_COMMAND };
      MBeanNotificationInfo info = new MBeanNotificationInfo(types, Notification.class.getName(), "A command request event has been emitted by this mbean");
      NotificationBroadcasterSupport emitter = new NotificationBroadcasterSupport(info);

      mbean = new StandardEmitterMBean(this, JMXTestRunnerMBean.class, emitter);
      mbeanServer.registerMBean(mbean, OBJECT_NAME);

      log.fine("JMXTestRunner registered: " + OBJECT_NAME);
   }
View Full Code Here

        return new NotificationBroadcasterSupport(launch, death);
    }

    private StandardEmitterMBean registerMBean(String name, Class<?> mbeanInterface) {
        try {
            final StandardEmitterMBean _mbean = new StandardEmitterMBean(this, (Class) mbeanInterface, createEmitter());
            final MBeanServer mbs = ManagementFactory.getPlatformMBeanServer();
            final ObjectName mxbeanName = ObjectName.getInstance(name);
            mbs.registerMBean(_mbean, mxbeanName);
            return _mbean;
        } catch (InstanceAlreadyExistsException ex) {
View Full Code Here

        // Make DynamicMBean out of MXBean by wrapping it with a StandardMBean
        final DynamicMBean dmbean;
        if (pmo instanceof DynamicMBean) {
            dmbean = DynamicMBean.class.cast(pmo);
        } else if (pmo instanceof NotificationEmitter) {
            dmbean = new StandardEmitterMBean(pmo, null, true, (NotificationEmitter) pmo);
        } else {
            dmbean = new StandardMBean(pmo, null, true);
        }

        try {
View Full Code Here

TOP

Related Classes of javax.management.StandardEmitterMBean

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.