S - The type of service to be looked uppublic abstract class AbstractSingleAttributeBasedControllerServiceLookup<S extends ControllerService> extends AbstractControllerService
S.
Selection is based on a single String lookup key.
Lookup key is provided as a value in an attribute map (usually coming form a flowfile)
with a predefined key (see getLookupAttribute()).
| Modifier and Type | Field and Description |
|---|---|
protected Map<String,S> |
serviceMap |
| Constructor and Description |
|---|
AbstractSingleAttributeBasedControllerServiceLookup() |
| Modifier and Type | Method and Description |
|---|---|
protected Collection<ValidationResult> |
customValidate(ValidationContext context) |
protected abstract String |
getLookupAttribute() |
protected String |
getServiceName() |
abstract Class<S> |
getServiceType() |
protected PropertyDescriptor |
getSupportedDynamicPropertyDescriptor(String propertyDescriptorName) |
protected PropertyDescriptor |
lookupKeyPropertyDescriptor(String propertyDescriptorName) |
S |
lookupService(Map<String,String> attributes)
Returns a ControllerService (of type
S) based on the provided attributes map (usually by retrieving
a lookup attribute from it via getLookupAttribute() and use it to identify the appropriate service). |
void |
onDisabled() |
void |
onEnabled(ConfigurationContext context) |
private Collection<ValidationResult> |
validateForAtLeastOneService(ValidationContext context) |
abstractClearConfigContext, abstractStoreConfigContext, disabled, enabled, getConfigurationContext, getControllerServiceLookup, getIdentifier, getLogger, getNodeTypeProvider, getProperty, getStateManager, init, initialize, isEnabledequals, getPropertyDescriptor, getPropertyDescriptors, getSupportedPropertyDescriptors, hashCode, onPropertyModified, toString, validateclone, finalize, getClass, notify, notifyAll, wait, wait, waitisStatefulgetPropertyDescriptor, getPropertyDescriptors, onPropertyModified, validateprotected volatile Map<String,S extends ControllerService> serviceMap
public AbstractSingleAttributeBasedControllerServiceLookup()
public abstract Class<S> getServiceType()
lookupService(Map)protected abstract String getLookupAttribute()
S)public S lookupService(Map<String,String> attributes)
S) based on the provided attributes map (usually by retrieving
a lookup attribute from it via getLookupAttribute() and use it to identify the appropriate service).attributes - Map containing the lookup attribute based on which ControllerService is chosen@OnEnabled public void onEnabled(ConfigurationContext context)
@OnDisabled public void onDisabled()
protected PropertyDescriptor getSupportedDynamicPropertyDescriptor(String propertyDescriptorName)
getSupportedDynamicPropertyDescriptor in class AbstractConfigurableComponentprotected Collection<ValidationResult> customValidate(ValidationContext context)
customValidate in class AbstractConfigurableComponentprotected PropertyDescriptor lookupKeyPropertyDescriptor(String propertyDescriptorName)
private Collection<ValidationResult> validateForAtLeastOneService(ValidationContext context)
protected String getServiceName()
Copyright © 2024 Apache NiFi Project. All rights reserved.