Examples of MBeanServerNotification


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();
       
        try
        {
            if ( type.equals( MBeanServerNotification.REGISTRATION_NOTIFICATION  ) )
            {

Examples of javax.management.MBeanServerNotification

  {
    final String  type  = notifIn.getType();
   
    if ( type.equals( MBeanServerNotification.UNREGISTRATION_NOTIFICATION)  )
    {
      final MBeanServerNotification  notif  = (MBeanServerNotification)notifIn;
      final ObjectName  objectName  = notif.getMBeanName();
      final AMX proxy  = getProxy( objectName, AMX.class, false );
      mProxyCache.remove( objectName );
      ConverterHandlerUtil.targetUnregistered(proxy);
     
      //debug( "ProxyFactory.handleNotification: UNREGISTERED: ", objectName );

Examples of javax.management.MBeanServerNotification

    * @returns ObjectName the ObjectName extracted from the given <code>notification</code> parameter
    */
    private ObjectName getObjectName(Notification notification){
        ObjectName objectName = null;
        if(notification.getClass().getName().equals("javax.management.MBeanServerNotification")){  //NOI18N
            MBeanServerNotification msn = (MBeanServerNotification)notification;
            //printInfo(msn);
            String canonicalName = msn.getMBeanName().getCanonicalName();
            try {
                objectName = new ObjectName(canonicalName);
            } catch(javax.management.MalformedObjectNameException ex){
                Utils.log(Level.WARNING, ex.getMessage(), ex);
            }

Examples of javax.management.MBeanServerNotification

    * @param notification notification recieved
    * @param handback same object that was passed to mbeanserver during registration of this listener
    */
    public void handleNotification(Notification notification, Object handback) {
        if(notification.getClass().getName().equals("javax.management.MBeanServerNotification")) {    //NOI18N
            MBeanServerNotification mbeanServerNotification = (MBeanServerNotification)notification;
            //printInfo(msn);

            ObjectName asObjectName = (ObjectName)mbeanServerNotification.getUserData();
            String monitoringASMBean = null;

            if((asObjectName != null) && (server != null)) {

                if(REGISTER_EVENT.equals(notification.getType())) {

Examples of javax.management.MBeanServerNotification

    }
   
    if ( notif instanceof MBeanServerNotification )
    {
      // this should really be done in a MBeanServerNotificationStringifier!
      final MBeanServerNotification  n  = (MBeanServerNotification)notif;
     
      append( b, StringUtil.quote( n.getMBeanName() ) );
    }
   
    return( b );
  }

Examples of javax.management.MBeanServerNotification

    if ( ! (notifIn instanceof MBeanServerNotification) )
    {
        throw new IllegalArgumentException( notifIn.toString() );
    }
   
    final MBeanServerNotification notif  = (MBeanServerNotification)notifIn;
    final ObjectName objectName  = notif.getMBeanName();
    final String     type  = notif.getType();
   
    final boolean matchesFilter   = (mRegUnregFilter == null) ||
      JMXUtil.matchesPattern( mDefaultDomain, mRegUnregFilter, objectName );
     
    if ( matchesFilter )

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

         mbsc.addNotificationListener(emitterName, listenerName, filter, handback);

         // Wait for notifications threads to start
         sleep(1000);

         Notification notification = new MBeanServerNotification(MBeanServerNotification.REGISTRATION_NOTIFICATION, this, 0, name);
         emitter.emit(notification);

         // Wait for notification to arrive
         sleep(1000);

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();

                try
                {
                    if (type.equals(MBeanServerNotification.REGISTRATION_NOTIFICATION))
                    {

Examples of javax.management.MBeanServerNotification

        super(options);
    }

    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());
    }
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.