Package org.apache.nifi.processor
Class AbstractSessionFactoryProcessor
java.lang.Object
org.apache.nifi.components.AbstractConfigurableComponent
org.apache.nifi.processor.AbstractSessionFactoryProcessor
- All Implemented Interfaces:
ConfigurableComponent
,Processor
- Direct Known Subclasses:
AbstractProcessor
public abstract class AbstractSessionFactoryProcessor
extends AbstractConfigurableComponent
implements Processor
Provides a standard partial implementation of a Processor
. This
implementation provides default behavior and various convenience hooks for
processing.
Implementation/Design note: This class follows the open/closed principle in a
fairly strict manner meaning that subclasses are free to customize behavior
in specifically designed points exclusively. If greater flexibility is
necessary then it is still possible to simply implement the Processor
interface.
Thread safe
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate boolean
private String
private String
private ComponentLog
private NodeTypeProvider
private boolean
private ControllerServiceLookup
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected final ControllerServiceLookup
final String
protected final ComponentLog
protected final NodeTypeProvider
protected void
init
(ProcessorInitializationContext context) Provides subclasses the ability to perform initialization logicfinal void
initialize
(ProcessorInitializationContext context) Provides the processor with access to objects that may be of use throughout the life of the Processorprotected boolean
Returns a boolean indicating whether or not the configuration of the Processor has already been restored.protected final boolean
toString()
final void
final void
final void
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, onTrigger
-
Field Details
-
identifier
-
logger
-
scheduled
private volatile boolean scheduled -
configurationRestored
private volatile boolean configurationRestored -
serviceLookup
-
nodeTypeProvider
-
description
-
-
Constructor Details
-
AbstractSessionFactoryProcessor
public AbstractSessionFactoryProcessor()
-
-
Method Details
-
initialize
Description copied from interface:Processor
Provides the processor with access to objects that may be of use throughout the life of the Processor- Specified by:
initialize
in interfaceProcessor
- Parameters:
context
- of initialization
-
getControllerServiceLookup
- Returns:
- the
ControllerServiceLookup
that was passed to theinit(ProcessorInitializationContext)
method
-
getNodeTypeProvider
- Returns:
- the
NodeTypeProvider
that was passed to theinit(ProcessorInitializationContext)
method
-
getRelationships
- Specified by:
getRelationships
in interfaceProcessor
- Returns:
- Set of all relationships this processor expects to transfer a flow file to. An empty set indicates this processor does not have any destination relationships. Guaranteed non null.
-
getLogger
-
init
Provides subclasses the ability to perform initialization logic- Parameters:
context
- in which to perform initialization
-
isScheduled
protected final boolean isScheduled()- Returns:
true
if the processor is scheduled to run,false
otherwise
-
updateScheduledTrue
-
updateScheduledFalse
-
updateConfiguredRestoredTrue
-
isConfigurationRestored
protected boolean isConfigurationRestored()Returns a boolean indicating whether or not the configuration of the Processor has already been restored. See theOnConfigurationRestored
annotation for more information about what it means for the configuration to be restored.- Returns:
true
if configuration has been restored,false
otherwise.
-
getIdentifier
- Specified by:
getIdentifier
in interfaceConfigurableComponent
- Returns:
- the unique identifier that the framework assigned to this component
-
toString
- Overrides:
toString
in classAbstractConfigurableComponent
-