public void fireDepthThresholdReachedEvent ( ControlAdapter cAdapter , boolean reachedHigh , long numMsgs , long msgLimit ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "fireDepthThresholdReachedEvent" , new Object [ ] { cAdapter , new Boolean ( reachedHigh ) , new Long ( numMsgs ) } ) ; // Retrieve appropriate information String destinationName = destinationHandler . getName ( ) ; String meName = mp . getMessagingEngineName ( ) ; // If we've been told to output the event message to the log, do it... if ( mp . getCustomProperties ( ) . getOutputDestinationThresholdEventsToLog ( ) ) { if ( reachedHigh ) SibTr . info ( tc , "NOTIFY_DEPTH_THRESHOLD_REACHED_CWSIP0553" , new Object [ ] { destinationName , meName , msgLimit } ) ; else SibTr . info ( tc , "NOTIFY_DEPTH_THRESHOLD_REACHED_CWSIP0554" , new Object [ ] { destinationName , meName , msgLimit } ) ; } // If we're actually issuing events, do that too... if ( _isEventNotificationEnabled ) { if ( cAdapter != null ) { // Build the message for the Notification String message = null ; if ( reachedHigh ) message = nls . getFormattedMessage ( "NOTIFY_DEPTH_THRESHOLD_REACHED_CWSIP0553" , new Object [ ] { destinationName , meName , msgLimit } , null ) ; else message = nls . getFormattedMessage ( "NOTIFY_DEPTH_THRESHOLD_REACHED_CWSIP0554" , new Object [ ] { destinationName , meName , msgLimit } , null ) ; // Build the properties for the Notification Properties props = new Properties ( ) ; props . put ( SibNotificationConstants . KEY_DESTINATION_NAME , destinationName ) ; props . put ( SibNotificationConstants . KEY_DESTINATION_UUID , destinationHandler . getUuid ( ) . toString ( ) ) ; if ( reachedHigh ) props . put ( SibNotificationConstants . KEY_DEPTH_THRESHOLD_REACHED , SibNotificationConstants . DEPTH_THRESHOLD_REACHED_HIGH ) ; else props . put ( SibNotificationConstants . KEY_DEPTH_THRESHOLD_REACHED , SibNotificationConstants . DEPTH_THRESHOLD_REACHED_LOW ) ; // Number of Messages props . put ( SibNotificationConstants . KEY_MESSAGES , String . valueOf ( numMsgs ) ) ; // Now create the Event object to pass to the control adapter MPRuntimeEvent MPevent = new MPRuntimeEvent ( SibNotificationConstants . TYPE_SIB_MESSAGEPOINT_DEPTH_THRESHOLD_REACHED , message , props ) ; // Fire the event if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) SibTr . debug ( tc , "fireDepthThresholdReachedEvent" , "Drive runtimeEventOccurred against Control adapter: " + cAdapter ) ; cAdapter . runtimeEventOccurred ( MPevent ) ; } else { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) SibTr . debug ( tc , "fireDepthThresholdReachedEvent" , "Control adapter is null, cannot fire event" ) ; } } if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( tc , "fireDepthThresholdReachedEvent" ) ; }
Fire an event notification of type TYPE_SIB_MESSAGEPOINT_DEPTH_THRESHOLD_REACHED