Package javax.management

Examples of javax.management.MBeanNotificationInfo


        return getBroadcastInfo();
    }

    private static MBeanNotificationInfo[] getBroadcastInfo() {
        String type = Notification.class.getCanonicalName();
        MBeanNotificationInfo info1 = new MBeanNotificationInfo(new String[] {FEATURE_EVENT_EVENT_TYPE},
            type, "Some features notification");
        MBeanNotificationInfo info2 = new MBeanNotificationInfo(new String[] {REPOSITORY_EVENT_EVENT_TYPE},
            type, "Some repository notification");
        return new MBeanNotificationInfo[] {info1, info2};
    }
View Full Code Here


    @Override
    public MBeanNotificationInfo[] getNotificationInfo() {

        if(notificationInfo == null) {
            notificationInfo = new MBeanNotificationInfo[]{
                    new MBeanNotificationInfo(new String[] {
                    "j2ee.object.created"},
                    Notification.class.getName(),
                    "servlet is created"
                    ),
                    new MBeanNotificationInfo(new String[] {
                    "j2ee.state.starting"},
                    Notification.class.getName(),
                    "servlet is starting"
                    ),
                    new MBeanNotificationInfo(new String[] {
                    "j2ee.state.running"},
                    Notification.class.getName(),
                    "servlet is running"
                    ),
                    new MBeanNotificationInfo(new String[] {
                    "j2ee.state.stopped"},
                    Notification.class.getName(),
                    "servlet start to stopped"
                    ),
                    new MBeanNotificationInfo(new String[] {
                    "j2ee.object.stopped"},
                    Notification.class.getName(),
                    "servlet is stopped"
                    ),
                    new MBeanNotificationInfo(new String[] {
                    "j2ee.object.deleted"},
                    Notification.class.getName(),
                    "servlet is deleted"
                    )
            };
View Full Code Here

     */
    public MBeanNotificationInfo[] getNotificationInfo() {
      // FIXME: i18n
      if(notificationInfo == null) {
        notificationInfo = new MBeanNotificationInfo[]{
            new MBeanNotificationInfo(new String[] {
            "j2ee.object.created"},
          Notification.class.getName(),
          "web application is created"
            ),
          new MBeanNotificationInfo(new String[] {
          "j2ee.state.starting"},
          Notification.class.getName(),
          "change web application is starting"
          ),
          new MBeanNotificationInfo(new String[] {
          "j2ee.state.running"},
          Notification.class.getName(),
          "web application is running"
          ),
          new MBeanNotificationInfo(new String[] {
          "j2ee.state.stopped"},
          Notification.class.getName(),
          "web application start to stopped"
          ),
          new MBeanNotificationInfo(new String[] {
          "j2ee.object.stopped"},
          Notification.class.getName(),
          "web application is stopped"
          ),
          new MBeanNotificationInfo(new String[] {
          "j2ee.object.deleted"},
          Notification.class.getName(),
          "web application is deleted"
          )
        };
View Full Code Here

     */
    public MBeanNotificationInfo[] getNotificationInfo() {
     
      if(notificationInfo == null) {
        notificationInfo = new MBeanNotificationInfo[]{
            new MBeanNotificationInfo(new String[] {
            "j2ee.object.created"},
          Notification.class.getName(),
          "servlet is created"
            ),
          new MBeanNotificationInfo(new String[] {
          "j2ee.state.starting"},
          Notification.class.getName(),
          "servlet is starting"
          ),
          new MBeanNotificationInfo(new String[] {
          "j2ee.state.running"},
          Notification.class.getName(),
          "servlet is running"
          ),
          new MBeanNotificationInfo(new String[] {
          "j2ee.state.stopped"},
          Notification.class.getName(),
          "servlet start to stopped"
          ),
          new MBeanNotificationInfo(new String[] {
          "j2ee.object.stopped"},
          Notification.class.getName(),
          "servlet is stopped"
          ),
          new MBeanNotificationInfo(new String[] {
          "j2ee.object.deleted"},
          Notification.class.getName(),
          "servlet is deleted"
          )
        };
View Full Code Here

        // Return our cached information (if any)
        if (info != null)
            return (info);

        // Create and return a new information object
        info = new MBeanNotificationInfo
            (getNotifTypes(), getName(), getDescription());
        //Descriptor descriptor = info.getDescriptor();
        //addFields(descriptor);
        //info.setDescriptor(descriptor);
        return (info);
View Full Code Here

//            new ModelMBeanConstructorInfo[consts.length];
//        for (int i = 0; i < consts.length; i++)
//            constructors[i] = consts[i].createConstructorInfo();
       
        NotificationInfo notifs[] = getNotifications();
        MBeanNotificationInfo notifications[] =
            new MBeanNotificationInfo[notifs.length];
        for (int i = 0; i < notifs.length; i++)
            notifications[i] = notifs[i].createNotificationInfo();

       
View Full Code Here

//            new ModelMBeanConstructorInfo[consts.length];
//        for (int i = 0; i < consts.length; i++)
//            constructors[i] = consts[i].createConstructorInfo();
       
        NotificationInfo notifs[] = getNotifications();
        MBeanNotificationInfo notifications[] =
            new MBeanNotificationInfo[notifs.length];
        for (int i = 0; i < notifs.length; i++)
            notifications[i] = notifs[i].createNotificationInfo();

       
View Full Code Here

        return getBroadcastInfo();
    }

    private static MBeanNotificationInfo[] getBroadcastInfo() {
        String type = Notification.class.getCanonicalName();
        MBeanNotificationInfo info1 = new MBeanNotificationInfo(new String[] {FEATURE_EVENT_EVENT_TYPE},
            type, "Some features notification");
        MBeanNotificationInfo info2 = new MBeanNotificationInfo(new String[] {REPOSITORY_EVENT_EVENT_TYPE},
            type, "Some repository notification");
        return new MBeanNotificationInfo[] {info1, info2};
    }
View Full Code Here

   }

   public void registerMBean(MBeanServer mbeanServer) throws JMException
   {
      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);
View Full Code Here

    public MBeanNotificationInfoWrapper[] getMBeanNotificationInfoWrappers() {
        MBeanNotificationInfo[] notifications = info.getNotifications();
        MBeanNotificationInfoWrapper[] notificationWrappers = new MBeanNotificationInfoWrapper[notifications.length];
        for (int i = 0; i < notifications.length; i++) {
            MBeanNotificationInfo opInfo = notifications[i];
            notificationWrappers[i] = new MBeanNotificationInfoWrapper(opInfo,
                    on, mbsc);
        }
        return notificationWrappers;
    }
View Full Code Here

TOP

Related Classes of javax.management.MBeanNotificationInfo

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.