Interface NotificationHandlerDelegate

All Known Implementing Classes:
ContextCaptureDelegate, HeapDumpDelegate, PeriodicMemoryDumperDelegate, RequestCaptureDelegate, StackLoggingDelegate

public interface NotificationHandlerDelegate
Custom delegate interface for use with NotificationHandlerMBean via NotificationHandlerDelegateFactory implementations.

Supported API: true

Extendable: true
  • Method Details

    • preHandleNotification

      boolean preHandleNotification(NotificationHandlerMBean mbean, ObjectName source, Notification notification, boolean willOutputInfo)
      Method called by NotificationHandlerMBean both upon receipt of notification and when computing the InfoItemsPreview attribute (via getInfoItemsPreview()). In both cases, this method is called prior to any retrieval of JMX attribute data for output purposes.

      Supported API: true
      Parameters:
      mbean - NotificationHandlerMBean from which this delegate is being called
      source - Source of notification; may be null when called from getInfoItemsPreview()
      notification - Notification object; will be null when called from getInfoItemsPreview() and non-null otherwise
      willOutputInfo - Whether the NotificationHandlerMBean would produce output on its own
      Returns:
      Whether NotificationHandlerMBean should still produce output; result is ignored when called from getInfoItemsPreview()
    • postHandleNotification

      void postHandleNotification()
      Method called by NotificationHandlerMBean both upon receipt of notification and when computing the InfoItemsPreview attribute (via getInfoItemsPreview()). In both cases, this method is called after any retrieval of JMX attribute data for output purposes.

      Note that this will be the same instance of this class upon which the corresponding preHandleNotification() call was made and that separate instances are used otherwise -- so one can place data in the instance in preHandleNotification() for use in this routine.

      Supported API: true