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 booleanprivate Stringprivate Stringprivate ComponentLogprivate NodeTypeProviderprivate booleanprivate ControllerServiceLookup -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected final ControllerServiceLookupfinal Stringprotected final ComponentLogprotected final NodeTypeProviderprotected voidinit(ProcessorInitializationContext context) Provides subclasses the ability to perform initialization logicfinal voidinitialize(ProcessorInitializationContext context) Provides the processor with access to objects that may be of use throughout the life of the Processorprotected booleanReturns a boolean indicating whether or not the configuration of the Processor has already been restored.protected final booleantoString()final voidfinal voidfinal voidMethods inherited from class org.apache.nifi.components.AbstractConfigurableComponent
customValidate, equals, getPropertyDescriptor, getPropertyDescriptors, getSupportedDynamicPropertyDescriptor, getSupportedPropertyDescriptors, hashCode, onPropertyModified, validateMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.apache.nifi.components.ConfigurableComponent
getPropertyDescriptor, getPropertyDescriptors, onPropertyModified, validateMethods 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:ProcessorProvides the processor with access to objects that may be of use throughout the life of the Processor- Specified by:
initializein interfaceProcessor- Parameters:
context- of initialization
-
getControllerServiceLookup
- Returns:
- the
ControllerServiceLookupthat was passed to theinit(ProcessorInitializationContext)method
-
getNodeTypeProvider
- Returns:
- the
NodeTypeProviderthat was passed to theinit(ProcessorInitializationContext)method
-
getRelationships
- Specified by:
getRelationshipsin 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:
trueif the processor is scheduled to run,falseotherwise
-
updateScheduledTrue
-
updateScheduledFalse
-
updateConfiguredRestoredTrue
-
isConfigurationRestored
protected boolean isConfigurationRestored()Returns a boolean indicating whether or not the configuration of the Processor has already been restored. See theOnConfigurationRestoredannotation for more information about what it means for the configuration to be restored.- Returns:
trueif configuration has been restored,falseotherwise.
-
getIdentifier
- Specified by:
getIdentifierin interfaceConfigurableComponent- Returns:
- the unique identifier that the framework assigned to this component
-
toString
- Overrides:
toStringin classAbstractConfigurableComponent
-