Interface ReportingContext

All Superinterfaces:
PropertyContext

public interface ReportingContext extends PropertyContext
This interface provides a bridge between the NiFi Framework and a ReportingTask. This context allows a ReportingTask to access statistics, metrics, and monitoring information, as well as configuration supplied by the user.
  • Method Details

    • getProperties

      Map<PropertyDescriptor,String> getProperties()
      Returns:
      a Map of all known PropertyDescriptors to their configured properties. This Map will contain a null for any Property that has not been configured by the user, even if the PropertyDescriptor has a default value
    • getEventAccess

      EventAccess getEventAccess()
      Returns:
      the EventAccess object that can be used to obtain information about specific events and reports that have happened
    • getBulletinRepository

      BulletinRepository getBulletinRepository()
      Returns:
      the BulletinRepository that can be used to analyze Bulletins that have been emitted and register new Bulletins
    • createBulletin

      Bulletin createBulletin(String category, Severity severity, String message)
      Creates a controller-level Bulletin with the given category, severity level, and message, so that the Bulletin can be added to the BulletinRepository. Access to this bulletin will be enforce through permissions on the controller.
      Parameters:
      category - of bulletin
      severity - of bulletin
      message - of bulletin
      Returns:
      new bulletin
    • createBulletin

      Bulletin createBulletin(String componentId, String category, Severity severity, String message)
      Creates a Bulletin for the component with the specified identifier.
      Parameters:
      componentId - the ID of the component
      category - the name of the bulletin's category
      severity - the severity level of the bulletin
      message - the bulletin's message
      Returns:
      new bulletin
    • getControllerServiceLookup

      ControllerServiceLookup getControllerServiceLookup()
      Returns:
      the ControllerServiceLookup which can be used to obtain Controller Services
    • getStateManager

      StateManager getStateManager()
      Returns:
      the StateManager that can be used to store and retrieve state for this component
    • isClustered

      boolean isClustered()
      Returns:
      true if this instance of NiFi is configured to be part of a cluster, false if this instance of NiFi is a standalone instance
    • getClusterNodeIdentifier

      String getClusterNodeIdentifier()
      Returns:
      the ID of this node in the cluster, or null if either this node is not clustered or the Node Identifier has not yet been established
    • isAnalyticsEnabled

      default boolean isAnalyticsEnabled()
      Returns:
      true if reporting analytics (connection status predictions, e.g.) are enabled, false otherwise