Package org.apache.nifi.processor
Class AbstractProcessor
java.lang.Object
org.apache.nifi.components.AbstractConfigurableComponent
org.apache.nifi.processor.AbstractSessionFactoryProcessor
org.apache.nifi.processor.AbstractProcessor
- All Implemented Interfaces:
ConfigurableComponent
,Processor
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract void
onTrigger
(ProcessContext context, ProcessSession session) final void
onTrigger
(ProcessContext context, ProcessSessionFactory sessionFactory) The method called when this processor is triggered to operate by the controller.Methods inherited from class org.apache.nifi.processor.AbstractSessionFactoryProcessor
getControllerServiceLookup, getIdentifier, getLogger, getNodeTypeProvider, getRelationships, init, initialize, isConfigurationRestored, isScheduled, toString, updateConfiguredRestoredTrue, updateScheduledFalse, updateScheduledTrue
Methods inherited from class org.apache.nifi.components.AbstractConfigurableComponent
customValidate, equals, getPropertyDescriptor, getPropertyDescriptors, getSupportedDynamicPropertyDescriptor, getSupportedPropertyDescriptors, hashCode, onPropertyModified, validate
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.apache.nifi.components.ConfigurableComponent
getPropertyDescriptor, getPropertyDescriptors, onPropertyModified, validate
Methods inherited from interface org.apache.nifi.processor.Processor
isStateful, migrateProperties, migrateRelationships
-
Constructor Details
-
AbstractProcessor
public AbstractProcessor()
-
-
Method Details
-
onTrigger
public final void onTrigger(ProcessContext context, ProcessSessionFactory sessionFactory) throws ProcessException Description copied from interface:Processor
The method called when this processor is triggered to operate by the controller. In the absence of the
TriggerSerially
annotation, this method may be called concurrently from different threads. When this method is called depends on how this processor is configured within a controller to be triggered (timing or event based).- Parameters:
context
- provides access to convenience methods for obtaining property values, delaying the scheduling of the processor, provides access to Controller Services, etc.sessionFactory
- provides access to aProcessSession
, which can be used for accessing FlowFiles, etc.- Throws:
ProcessException
- if processing did not complete normally though indicates the problem is an understood potential outcome of processing. The controller/caller will handle these exceptions gracefully such as logging, etc.. If another type of exception is allowed to propagate the controller may no longer trigger this processor to operate, as this would indicate a probable coding defect.
-
onTrigger
public abstract void onTrigger(ProcessContext context, ProcessSession session) throws ProcessException - Throws:
ProcessException
-