Package org.apache.nifi.reporting
Interface ReportingContext
- All Superinterfaces:
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 Summary
Modifier and TypeMethodDescriptioncreateBulletin
(String componentId, String category, Severity severity, String message) Creates aBulletin
for the component with the specified identifier.createBulletin
(String category, Severity severity, String message) Creates a controller-levelBulletin
with the given category, severity level, and message, so that the Bulletin can be added to theBulletinRepository
.default boolean
boolean
Methods inherited from interface org.apache.nifi.context.PropertyContext
getAllProperties, getProperty
-
Method Details
-
getProperties
Map<PropertyDescriptor,String> getProperties()- Returns:
- a Map of all known
PropertyDescriptor
s to their configured properties. This Map will contain anull
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
Creates a controller-levelBulletin
with the given category, severity level, and message, so that the Bulletin can be added to theBulletinRepository
. Access to this bulletin will be enforce through permissions on the controller.- Parameters:
category
- of bulletinseverity
- of bulletinmessage
- of bulletin- Returns:
- new bulletin
-
createBulletin
Creates aBulletin
for the component with the specified identifier.- Parameters:
componentId
- the ID of the componentcategory
- the name of the bulletin's categoryseverity
- the severity level of the bulletinmessage
- 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
-