Class UCPBackedDataSourceExtension
- java.lang.Object
-
- io.helidon.integrations.datasource.cdi.AbstractDataSourceExtension
-
- io.helidon.integrations.datasource.ucp.cdi.UCPBackedDataSourceExtension
-
- All Implemented Interfaces:
Extension
public class UCPBackedDataSourceExtension extends AbstractDataSourceExtension
AnExtensionthat arranges for namedDataSourceinjection points to be satisfied by the Oracle Universal Connection Pool.
-
-
Constructor Summary
Constructors Constructor Description UCPBackedDataSourceExtension()Creates a newUCPBackedDataSourceExtension.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidaddBean(BeanConfigurator<DataSource> beanConfigurator, Named dataSourceName, Properties dataSourceProperties)Called to permit subclasses to add aDataSource-typed bean using the suppliedBeanConfigurator.protected StringgetDataSourceName(Matcher dataSourcePropertyPatternMatcher)Given aMatcherthat has been produced by theAbstractDataSourceExtension.getDataSourcePropertyPatternMatcher(String)method, returns the relevant data source name.protected StringgetDataSourcePropertyName(Matcher dataSourcePropertyPatternMatcher)Given aMatcherthat has been produced by theAbstractDataSourceExtension.getDataSourcePropertyPatternMatcher(String)method, returns the relevant data source property name.protected MatchergetDataSourcePropertyPatternMatcher(String configPropertyName)Returns aMatcherfor a property name.-
Methods inherited from class io.helidon.integrations.datasource.cdi.AbstractDataSourceExtension
getConfig, getDataSourceNames, getPropertyNames, initializeMasterProperties, putDataSourceProperties
-
-
-
-
Constructor Detail
-
UCPBackedDataSourceExtension
public UCPBackedDataSourceExtension()
Creates a newUCPBackedDataSourceExtension.
-
-
Method Detail
-
getDataSourcePropertyPatternMatcher
protected final Matcher getDataSourcePropertyPatternMatcher(String configPropertyName)
Description copied from class:AbstractDataSourceExtensionReturns aMatcherfor a property name.Implementations of this method must not return
null.Given a
Stringlikejavax.sql.DataSource.dataSourceName.dataSourcePropertyName, any implementation of this method should return a non-nullMatcherthat is capable of being supplied to theAbstractDataSourceExtension.getDataSourceName(Matcher)andAbstractDataSourceExtension.getDataSourcePropertyName(Matcher)methods.- Specified by:
getDataSourcePropertyPatternMatcherin classAbstractDataSourceExtension- Parameters:
configPropertyName- the name of a configuration property that logically contains a data source name and a data source property name; must not benull- Returns:
- a non-
nullMatcher - See Also:
AbstractDataSourceExtension.getDataSourceName(Matcher),AbstractDataSourceExtension.getDataSourcePropertyName(Matcher)
-
getDataSourceName
protected final String getDataSourceName(Matcher dataSourcePropertyPatternMatcher)
Description copied from class:AbstractDataSourceExtensionGiven aMatcherthat has been produced by theAbstractDataSourceExtension.getDataSourcePropertyPatternMatcher(String)method, returns the relevant data source name.Implementations of this method may return
null.- Specified by:
getDataSourceNamein classAbstractDataSourceExtension- Parameters:
dataSourcePropertyPatternMatcher- aMatcherproduced by theAbstractDataSourceExtension.getDataSourcePropertyPatternMatcher(String)method; must not benull- Returns:
- a data source name, or
null - See Also:
AbstractDataSourceExtension.getDataSourcePropertyPatternMatcher(String)
-
getDataSourcePropertyName
protected final String getDataSourcePropertyName(Matcher dataSourcePropertyPatternMatcher)
Description copied from class:AbstractDataSourceExtensionGiven aMatcherthat has been produced by theAbstractDataSourceExtension.getDataSourcePropertyPatternMatcher(String)method, returns the relevant data source property name.Implementations of this method may return
null.- Specified by:
getDataSourcePropertyNamein classAbstractDataSourceExtension- Parameters:
dataSourcePropertyPatternMatcher- aMatcherproduced by theAbstractDataSourceExtension.getDataSourcePropertyPatternMatcher(String)method; must not benull- Returns:
- a data source property name, or
null - See Also:
AbstractDataSourceExtension.getDataSourcePropertyPatternMatcher(String)
-
addBean
protected final void addBean(BeanConfigurator<DataSource> beanConfigurator, Named dataSourceName, Properties dataSourceProperties)
Description copied from class:AbstractDataSourceExtensionCalled to permit subclasses to add aDataSource-typed bean using the suppliedBeanConfigurator.Implementations of this method will be called from an observer method that is observing the
AfterBeanDiscoverycontainer lifecycle event.- Specified by:
addBeanin classAbstractDataSourceExtension- Parameters:
beanConfigurator- theBeanConfiguratorto use to actually add a new bean; must not benulldataSourceName- aNamedinstance qualifying theDataSource-typed bean to be added; may benulldataSourceProperties- aPropertiesinstance containing properties relevant to the data source; must not benull
-
-