public abstract class AbstractReportingTask extends AbstractConfigurableComponent implements ReportingTask
Modifier and Type | Field and Description |
---|---|
private String |
identifier |
private ComponentLog |
logger |
private String |
name |
private long |
schedulingNanos |
private ControllerServiceLookup |
serviceLookup |
Constructor and Description |
---|
AbstractReportingTask() |
Modifier and Type | Method and Description |
---|---|
protected ControllerServiceLookup |
getControllerServiceLookup() |
String |
getIdentifier() |
protected ComponentLog |
getLogger() |
protected String |
getName() |
protected long |
getSchedulingPeriod(TimeUnit timeUnit) |
protected void |
init(ReportingInitializationContext config)
Provides a mechanism by which subclasses can perform initialization of
the Reporting Task before it is scheduled to be run
|
void |
initialize(ReportingInitializationContext config)
Provides the Reporting Task with access to objects that may be of use
throughout the life of the service
|
customValidate, equals, getPropertyDescriptor, getPropertyDescriptors, getSupportedDynamicPropertyDescriptor, getSupportedPropertyDescriptors, hashCode, onPropertyModified, toString, validate
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
onTrigger
getPropertyDescriptor, getPropertyDescriptors, onPropertyModified, validate
private String identifier
private String name
private long schedulingNanos
private ControllerServiceLookup serviceLookup
private ComponentLog logger
public final void initialize(ReportingInitializationContext config) throws InitializationException
ReportingTask
initialize
in interface ReportingTask
config
- of initialization contextInitializationException
- if unable to initprotected final ControllerServiceLookup getControllerServiceLookup()
ControllerServiceLookup
that was passed to the
#init(ProcessorInitializationContext)
methodpublic String getIdentifier()
getIdentifier
in interface ConfigurableComponent
protected String getName()
protected long getSchedulingPeriod(TimeUnit timeUnit)
timeUnit
- of scheduling periodReportingTask.onTrigger(ReportingContext)
and the next time that
ReportingTask.onTrigger(ReportingContext)
is called.protected void init(ReportingInitializationContext config) throws InitializationException
config
- contextInitializationException
- if failure to initprotected ComponentLog getLogger()
Copyright © 2017 Apache NiFi Project. All rights reserved.