@Tags(value={"reporting","script","execute","groovy","python","jython","jruby","ruby","javascript","js","lua","luaj"}) @CapabilityDescription(value="Provides reporting and status information to a script. ReportingContext, ComponentLog, and VirtualMachineMetrics objects are made available as variables (context, log, and vmMetrics, respectively) to the script for further processing. The context makes various information available such as events, provenance, bulletins, controller services, process groups, Java Virtual Machine metrics, etc.") @DynamicProperty(name="A script engine property to update", value="The value to set it to", expressionLanguageScope=VARIABLE_REGISTRY, description="Updates a script engine property specified by the Dynamic Property\'s key with the value specified by the Dynamic Property\'s value") @Restricted(restrictions=@Restriction(requiredPermission=EXECUTE_CODE,explanation="Provides operator the ability to execute arbitrary code assuming all permissions that NiFi has.")) public class ScriptedReportingTask extends AbstractReportingTask
| Modifier and Type | Field and Description |
|---|---|
protected ScriptingComponentHelper |
scriptingComponentHelper |
private String |
scriptToRun |
private JmxJvmMetrics |
vmMetrics |
| Constructor and Description |
|---|
ScriptedReportingTask() |
| Modifier and Type | Method and Description |
|---|---|
protected Collection<ValidationResult> |
customValidate(ValidationContext validationContext) |
protected PropertyDescriptor |
getSupportedDynamicPropertyDescriptor(String propertyDescriptorName)
Returns a PropertyDescriptor for the given name.
|
protected List<PropertyDescriptor> |
getSupportedPropertyDescriptors()
Returns a list of property descriptors supported by this processor.
|
void |
onTrigger(ReportingContext context) |
void |
setup(ConfigurationContext context)
Performs setup operations when the processor is scheduled to run.
|
getControllerServiceLookup, getIdentifier, getLogger, getName, getNodeTypeProvider, getSchedulingPeriod, init, initialize, setComponentInfoequals, getPropertyDescriptor, getPropertyDescriptors, hashCode, onPropertyModified, toString, validateclone, finalize, getClass, notify, notifyAll, wait, wait, waitgetPropertyDescriptor, getPropertyDescriptors, onPropertyModified, validateprotected volatile ScriptingComponentHelper scriptingComponentHelper
private volatile String scriptToRun
private volatile JmxJvmMetrics vmMetrics
protected List<PropertyDescriptor> getSupportedPropertyDescriptors()
getSupportedPropertyDescriptors in class AbstractConfigurableComponentprotected PropertyDescriptor getSupportedDynamicPropertyDescriptor(String propertyDescriptorName)
getSupportedDynamicPropertyDescriptor in class AbstractConfigurableComponentpropertyDescriptorName - used to lookup if any property descriptors exist for that nameprotected Collection<ValidationResult> customValidate(ValidationContext validationContext)
customValidate in class AbstractConfigurableComponent@OnScheduled public void setup(ConfigurationContext context)
context - the context in which to perform the setup operationspublic void onTrigger(ReportingContext context)
Copyright © 2021 Apache NiFi Project. All rights reserved.