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
Modifier and Type | Field and Description |
---|---|
private boolean |
configurationRestored |
private String |
description |
private String |
identifier |
private ComponentLog |
logger |
private NodeTypeProvider |
nodeTypeProvider |
private boolean |
scheduled |
private ControllerServiceLookup |
serviceLookup |
Constructor and Description |
---|
AbstractSessionFactoryProcessor() |
Modifier and Type | Method and Description |
---|---|
protected ControllerServiceLookup |
getControllerServiceLookup() |
String |
getIdentifier() |
protected ComponentLog |
getLogger() |
protected NodeTypeProvider |
getNodeTypeProvider() |
Set<Relationship> |
getRelationships() |
protected void |
init(ProcessorInitializationContext context)
Provides subclasses the ability to perform initialization logic
|
void |
initialize(ProcessorInitializationContext context)
Provides the processor with access to objects that may be of use
throughout the life of the Processor
|
protected boolean |
isConfigurationRestored()
Returns a boolean indicating whether or not the configuration of the Processor has already been restored.
|
protected boolean |
isScheduled() |
String |
toString() |
void |
updateConfiguredRestoredTrue() |
void |
updateScheduledFalse() |
void |
updateScheduledTrue() |
customValidate, equals, getPropertyDescriptor, getPropertyDescriptors, getSupportedDynamicPropertyDescriptor, getSupportedPropertyDescriptors, hashCode, onPropertyModified, validate
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
isStateful, onTrigger
getPropertyDescriptor, getPropertyDescriptors, onPropertyModified, validate
private String identifier
private ComponentLog logger
private volatile boolean scheduled
private volatile boolean configurationRestored
private ControllerServiceLookup serviceLookup
private NodeTypeProvider nodeTypeProvider
private String description
public final void initialize(ProcessorInitializationContext context)
Processor
initialize
in interface Processor
context
- of initializationprotected final ControllerServiceLookup getControllerServiceLookup()
ControllerServiceLookup
that was passed to the
init(ProcessorInitializationContext)
methodprotected final NodeTypeProvider getNodeTypeProvider()
NodeTypeProvider
that was passed to the
init(ProcessorInitializationContext)
methodpublic Set<Relationship> getRelationships()
getRelationships
in interface Processor
protected final ComponentLog getLogger()
protected void init(ProcessorInitializationContext context)
context
- in which to perform initializationprotected final boolean isScheduled()
true
if the processor is scheduled to run,
false
otherwise@OnScheduled public final void updateScheduledTrue()
@OnUnscheduled public final void updateScheduledFalse()
@OnConfigurationRestored public final void updateConfiguredRestoredTrue()
protected boolean isConfigurationRestored()
OnConfigurationRestored
annotation for more information about what it means for the configuration
to be restored.true
if configuration has been restored, false
otherwise.public final String getIdentifier()
getIdentifier
in interface ConfigurableComponent
public String toString()
toString
in class AbstractConfigurableComponent
Copyright © 2022 Apache NiFi Project. All rights reserved.