public abstract class AbstractProcessor extends AbstractSessionFactoryProcessor
Constructor and Description |
---|
AbstractProcessor() |
Modifier and Type | Method and Description |
---|---|
abstract void |
onTrigger(ProcessContext context,
ProcessSession session) |
void |
onTrigger(ProcessContext context,
ProcessSessionFactory sessionFactory)
The method called when this processor is triggered to operate by the
controller.
|
getControllerServiceLookup, getIdentifier, getLogger, getNodeTypeProvider, getRelationships, init, initialize, isConfigurationRestored, isScheduled, toString, updateConfiguredRestoredTrue, updateScheduledFalse, updateScheduledTrue
customValidate, equals, getPropertyDescriptor, getPropertyDescriptors, getSupportedDynamicPropertyDescriptor, getSupportedPropertyDescriptors, hashCode, onPropertyModified, validate
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
isStateful
getPropertyDescriptor, getPropertyDescriptors, onPropertyModified, validate
public final void onTrigger(ProcessContext context, ProcessSessionFactory sessionFactory) throws ProcessException
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).
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 a ProcessSession
, which
can be used for accessing FlowFiles, etc.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.public abstract void onTrigger(ProcessContext context, ProcessSession session) throws ProcessException
ProcessException
Copyright © 2024 Apache NiFi Project. All rights reserved.