Examples of MBeanServerNotification


Examples of javax.management.MBeanServerNotification

  if (isTraceOn())
      trace("handleNotification: entering", notif.toString());

  if (notif instanceof MBeanServerNotification) {

      MBeanServerNotification mbsNtf = (MBeanServerNotification) notif;
      String ntfType = notif.getType();

      if (ntfType.equals(
           MBeanServerNotification.UNREGISTRATION_NOTIFICATION )) {
    ObjectName mbeanName =

Examples of javax.management.MBeanServerNotification

    trace("isNotificationEnabled: type not selected, exiting", null);
      return false;
  }

  // We have a MBeanServerNotification: downcasts it
  MBeanServerNotification mbsNtf = (MBeanServerNotification)notif;

  // Checks the ObjectName
  ObjectName objName = mbsNtf.getMBeanName();
  // Is it selected?
  boolean isSelectedFlg = false;
  if (selectedNames != null) {
      // Not all are implicitly selected:
      // checks for explicit selection

Examples of javax.management.MBeanServerNotification

                        final String unreg =
                                MBeanServerNotification.UNREGISTRATION_NOTIFICATION;
                        if (notif instanceof MBeanServerNotification &&
                                notif.getType().equals(unreg)) {

                            MBeanServerNotification mbsn =
                                    (MBeanServerNotification) notif;
                            ObjectName name = mbsn.getMBeanName();

                            removeNotificationListener(name);
                        }
                    }
                    myListenerID = mbeanRemovedNotifID;

Examples of javax.management.MBeanServerNotification

        n.setTimeStamp(mTimestamp);
        sendNotification(n);
    }

    public void triggerMBeanServerNotification() throws Exception {
        MBeanServerNotification n = new MBeanServerNotification("mbeanserver", this, mSequence++, new ObjectName("TestDomain", "name", "foo"));
        n.setTimeStamp(mTimestamp);
        sendNotification(n);
    }

Examples of javax.management.MBeanServerNotification

   private static final QName MBEAN_NAME_QNAME = new QName("", MBEAN_NAME);

   protected void onSerialize(SerializationContext context, Notification notification) throws IOException
   {
      super.onSerialize(context, notification);
      MBeanServerNotification serverNotification = (MBeanServerNotification)notification;
      context.serialize(MBEAN_NAME_QNAME, null, serverNotification.getMBeanName());
   }

Examples of javax.management.MBeanServerNotification

                text.append(notif.getMessage() + '\n');
            }
            return;
        }
        if (notif instanceof MBeanServerNotification) {
            MBeanServerNotification mbsn = (MBeanServerNotification) notif;
            ObjectName mbeanName = mbsn.getMBeanName();
            if (MBeanServerNotification.REGISTRATION_NOTIFICATION.equals(notif.getType())) {
                onMBeanRegistered(mbeanName);
            } else if (MBeanServerNotification.UNREGISTRATION_NOTIFICATION.equals(notif.getType())) {
                onMBeanUnregistered(mbeanName);
            }

Examples of javax.management.MBeanServerNotification

  }
 
    public String
  stringify( Object o )
  {
    final MBeanServerNotification  notif  = (MBeanServerNotification)o;
   
    final StringBuffer  b  = super._stringify( notif );
    append( b, "" );
   
    append( b, "registered MBean: " + notif.getMBeanName() );
   
    return( b.toString() );
  }

Examples of javax.management.MBeanServerNotification

   
    // ensure that if a NotificationService is unregistered that we remove
    // it from our list
    if ( type.equals( MBeanServerNotification.UNREGISTRATION_NOTIFICATION)  )
    {
      final MBeanServerNotification  notif  = (MBeanServerNotification)notifIn;
      final ObjectName  objectName  = notif.getMBeanName();
     
      if ( Util.getJ2EEType( objectName ).
          equals( XTypes.NOTIFICATION_SERVICE ) )
      {
        mServices.remove( objectName );

Examples of javax.management.MBeanServerNotification

  {       
    final String  type  = notifIn.getType();
   
    if ( notifIn instanceof MBeanServerNotification )
    {
      final MBeanServerNotification  notif  = (MBeanServerNotification)notifIn;
      final ObjectName objectName  = notif.getMBeanName();
           
            if ( type == MBeanServerNotification.REGISTRATION_NOTIFICATION )
            {
                /*
                if ( JMXUtil.toString(objectName).equals( "amx:j2eeType=J2EEServer,name=server" ) )

Examples of javax.management.MBeanServerNotification

      final Notification  notifIn,
      final Object    handback)
    {
      if ( notifIn instanceof MBeanServerNotification )
      {
        final MBeanServerNotification  notif  = (MBeanServerNotification)notifIn;
       
        final ObjectName  objectName  = notif.getMBeanName();
        final String  type  = notif.getType();
       
        if ( type.equals( MBeanServerNotification.REGISTRATION_NOTIFICATION  ) )
        {
          listenToIfMatch( objectName );
        }
TOP
Copyright © 2018 www.massapi.com. 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.