Class UCPServiceConfigurationLocalhostProvider
- java.lang.Object
-
- io.helidon.service.configuration.api.ServiceConfigurationProvider
-
- io.helidon.service.configuration.ucp.UCPServiceConfigurationProvider
-
- io.helidon.service.configuration.ucp.localhost.UCPServiceConfigurationLocalhostProvider
-
@Deprecated public class UCPServiceConfigurationLocalhostProvider extends UCPServiceConfigurationProvider
Deprecated.This class is slated for removal.
-
-
Constructor Summary
Constructors Constructor Description UCPServiceConfigurationLocalhostProvider()
Deprecated.Creates a newUCPServiceConfigurationLocalhostProvider
.
-
Method Summary
-
Methods inherited from class io.helidon.service.configuration.ucp.UCPServiceConfigurationProvider
buildFor, getDataSourceProperty, getPrefix
-
Methods inherited from class io.helidon.service.configuration.api.ServiceConfigurationProvider
getAuthoritativeSystem, getServiceIdentifier
-
-
-
-
Constructor Detail
-
UCPServiceConfigurationLocalhostProvider
public UCPServiceConfigurationLocalhostProvider()
Deprecated.Creates a newUCPServiceConfigurationLocalhostProvider
.
-
-
Method Detail
-
create
protected UCPServiceConfiguration create(Properties properties, System system, Properties coordinates)
Deprecated.Overrides theUCPServiceConfigurationProvider.create(Properties, io.helidon.service.configuration.api.System, Properties)
method to return a newUCPServiceConfigurationLocalhost
instance when invoked.This method never returns
null
.Overrides of this method must not return
null
.This method returns a new
UCPServiceConfigurationLocalhost
instance with each invocation.Overrides of this method must return a new
UCPServiceConfiguration
implementation of some kind.- Overrides:
create
in classUCPServiceConfigurationProvider
- Parameters:
properties
- aProperties
instance that will be used as the basis of theUCPServiceConfigurationLocalhost
implementation that will be returned; must not benull
system
- aSystem
determined to be in effect; may, strictly speaking, benull
but ordinarily is non-null
and enabledcoordinates
- aProperties
instance representing the meta-properties in effect; may benull
- Returns:
- a new
UCPServiceConfigurationLocalhost
instance; nevernull
- Throws:
NullPointerException
- ifproperties
isnull
- See Also:
UCPServiceConfiguration(Properties, io.helidon.service.configuration.api.System, Properties)
,UCPServiceConfigurationProvider.buildFor(Set, Properties)
,UCPServiceConfigurationProvider.appliesTo(Properties, io.helidon.service.configuration.api.System, Properties)
-
appliesTo
protected boolean appliesTo(Properties properties, System system, Properties coordinates)
Deprecated.Overrides theUCPServiceConfigurationProvider.appliesTo(Properties, io.helidon.service.configuration.api.System, Properties)
method to returntrue
if the suppliedSystem
is enabled and an instance ofLocalhostSystem
and if the UCPServiceConfigurationProvider.appliesTo(Properties, io.helidon.service.configuration.api.System, Properties) method returnstrue
.- Overrides:
appliesTo
in classUCPServiceConfigurationProvider
- Parameters:
properties
- aProperties
instance that will be used as the basis of theUCPServiceConfigurationLocalhost
implementation that will be returned by thecreate(Properties, io.helidon.service.configuration.api.System, Properties)
method; must not benull
system
- aSystem
determined to be in effect; may, strictly speaking, benull
but ordinarily is non-null
and enabledcoordinates
- aProperties
instance representing the meta-properties in effect; may benull
- Returns:
true
if thisUCPServiceConfigurationLocalhostProvider
applies to the configuration space implied by the supplied parameters;false
otherwise- See Also:
UCPServiceConfigurationProvider.appliesTo(Properties, io.helidon.service.configuration.api.System, Properties)
-
installDataSourceProperties
protected void installDataSourceProperties(Properties target, System system, Properties coordinates, String dataSourceName)
Deprecated.Overrides theUCPServiceConfigurationProvider.installDataSourceProperties(Properties, io.helidon.service.configuration.api.System, Properties, String)
method to automatically create in-memory H2 databases as needed.Specifically, this method:
- Calls the
UCPServiceConfigurationProvider.installDataSourceProperties(Properties, io.helidon.service.configuration.api.System, Properties, String)
method with the supplied parameters. - Checks to see if a property named
javax.sql.DataSource.
dataSourceName
.explicitlyConfigured
has aString
value equal to anything other thantrue
, includingnull
. - If so, then it sets certain properties on
target
as follows:javax.sql.DataSource.
dataSourceName
.dataSourceClassName = org.h2.jdbcx.JdbcDataSource
javax.sql.DataSource.
dataSourceName
.dataSource.description = A local, transient, in-memory H2 database
javax.sql.DataSource.
dataSourceName
.dataSource.user = sa
javax.sql.DataSource.
dataSourceName
.dataSource.password =
javax.sql.DataSource.
dataSourceName
.dataSourceUrl = jdbc:h2:mem:
dataSourceName
- Overrides:
installDataSourceProperties
in classUCPServiceConfigurationProvider
- Parameters:
target
- aProperties
instance that will be used as the basis of theUCPServiceConfigurationLocalhost
implementation that will be returned by thecreate(Properties, io.helidon.service.configuration.api.System, Properties)
method and into which properties may be installed; must not benull
system
- aSystem
determined to be in effect; may, strictly speaking, benull
but ordinarily is non-null
and enabledcoordinates
- aProperties
instance representing the meta-properties in effect; may benull
dataSourceName
- the data source name in question; may benull
- Throws:
NullPointerException
- iftarget
isnull
- See Also:
UCPServiceConfigurationProvider.installDataSourceProperties(Properties, io.helidon.service.configuration.api.System, Properties, String)
- Calls the
-
-