@Tags(value={"dbcp","jdbc","database","connection","pooling","store"}) @CapabilityDescription(value="Provides a DBCPService that can be used to dynamically select another DBCPService. This service requires an attribute named \'database.name\' to be passed in when asking for a connection, and will throw an exception if the attribute is missing. The value of \'database.name\' will be used to select the DBCPService that has been registered with that name. This will allow multiple DBCPServices to be defined and registered, and then selected dynamically at runtime by tagging flow files with the appropriate \'database.name\' attribute.") @DynamicProperty(name="The name to register DBCPService", value="The DBCPService", description="If \'database.name\' attribute contains the name of the dynamic property, then the DBCPService (registered in the value) will be selected.", expressionLanguageScope=NONE) public class DBCPConnectionPoolLookup extends AbstractSingleAttributeBasedControllerServiceLookup<DBCPService> implements DBCPService
| Modifier and Type | Field and Description |
|---|---|
static String |
DATABASE_NAME_ATTRIBUTE |
serviceMap| Constructor and Description |
|---|
DBCPConnectionPoolLookup() |
| Modifier and Type | Method and Description |
|---|---|
Connection |
getConnection() |
Connection |
getConnection(Map<String,String> attributes) |
FlowFileFilter |
getFlowFileFilter() |
protected String |
getLookupAttribute() |
Class<DBCPService> |
getServiceType() |
customValidate, getServiceName, getSupportedDynamicPropertyDescriptor, lookupKeyPropertyDescriptor, lookupService, onDisabled, onEnabledabstractClearConfigContext, 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, waitgetFlowFileFilterinitialize, isStatefulgetIdentifier, getPropertyDescriptor, getPropertyDescriptors, onPropertyModified, validatepublic static final String DATABASE_NAME_ATTRIBUTE
protected String getLookupAttribute()
getLookupAttribute in class AbstractSingleAttributeBasedControllerServiceLookup<DBCPService>public Class<DBCPService> getServiceType()
getServiceType in class AbstractSingleAttributeBasedControllerServiceLookup<DBCPService>public Connection getConnection() throws ProcessException
getConnection in interface DBCPServiceProcessExceptionpublic Connection getConnection(Map<String,String> attributes)
getConnection in interface DBCPServicepublic FlowFileFilter getFlowFileFilter()
getFlowFileFilter in interface DBCPServiceCopyright © 2023 Apache NiFi Project. All rights reserved.