Package com.sun.appserv.management.util.jmx

Examples of com.sun.appserv.management.util.jmx.NotificationBuilder


                // don't construct a Notification if there are no listeners.
                if ( getLogLevelListenerCount( level ) != 0 )
                {
                    final String notifType  = logLevelToNotificationType( level );
                   
                    final NotificationBuilder   builder =
                        notificationTypeToNotificationBuilder( notifType );
                   
                    // Notification.getMessage() will be the formatted log record
                    final String    logRecordAsString    = formatter.format( logRecord );
                   
                    final Map<String,Serializable>  userData    =
                        logRecordToMap( logRecord, logRecordAsString );
                       
                    final Notification notif    =
                        builder.buildNewWithMap( logRecordAsString, userData);
                       
                    debug( "privateLoggingHook: sending: " + notif );
                    sendNotification( notif );
                }
                else
View Full Code Here


      public long
  emitNotifications(
      final String notifType,
      final int    howMany )
  {
      final NotificationBuilder builder   =
          new NotificationBuilder( notifType, mSelfObjectName );
         
      final long start    = System.currentTimeMillis();
     
      for( int i = 0; i < howMany; ++i )
      {
          final Notification  notif = builder.buildNew( "test Notification" );
         
          sendNotification( notif );
      }
     
      final long elapsed = System.currentTimeMillis() - start;
View Full Code Here

TOP

Related Classes of com.sun.appserv.management.util.jmx.NotificationBuilder

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.