Class ServiceConfiguration
- java.lang.Object
-
- io.helidon.service.configuration.api.ServiceConfiguration
-
- Direct Known Subclasses:
HikariCPServiceConfiguration,UCPServiceConfiguration
@Deprecated public abstract class ServiceConfiguration extends Object
Deprecated.This class is slated for removal.An abstract encapsulation of an automatically discovered configuration for a given service.For the purposes of configuration, a service is normally represented as a client library that connects to a remote provider of business value. Typically the client library needs to be configured in some way in order to function at all. Instances of this class aim to provide such configuration in as automated a manner as possible.
ServiceConfigurationinstances are typically produced byServiceConfigurationProviderinstances. Obtaining aServiceConfigurationby any other means may result in undefined behavior.- See Also:
getInstance(String),ServiceConfigurationProvider
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedServiceConfiguration(String serviceIdentifier)Deprecated.Creates a newServiceConfiguration.
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static ServiceConfigurationgetInstance(String serviceIdentifier)Deprecated.Returns the soleServiceConfigurationimplementation in effect for the currentSystems and identified by the suppliedserviceIdentifier, if there is one, ornullif there is no suchServiceConfiguration.static ServiceConfigurationgetInstance(String serviceIdentifier, Properties coordinates)Deprecated.Returns the soleServiceConfigurationimplementation in effect for the currentSystems and identified by the suppliedserviceIdentifierand suitable for the suppliedcoordinates, if there is one, ornullif there is no suchServiceConfiguration.StringgetProperty(String propertyName)Deprecated.Returns a value for the property described by the suppliedpropertyName, ornullif no such property value exists.abstract StringgetProperty(String propertyName, String defaultValue)Deprecated.Returns a value for the property described by the suppliedpropertyName, or the value of the supplieddefaultValueparameter if no such property value exists.abstract Set<String>getPropertyNames()Deprecated.Returns an unmodifiable and unchangingSetofStrings representing the names of properties whose values may be retrieved with thegetProperty(String)method.StringgetServiceIdentifier()Deprecated.Returns the identifier of the service thisServiceConfigurationimplementation provides configuration for.
-
-
-
Constructor Detail
-
ServiceConfiguration
protected ServiceConfiguration(String serviceIdentifier)
Deprecated.Creates a newServiceConfiguration.- Parameters:
serviceIdentifier- the identifier of the service thisServiceConfigurationimplementation will provide configuration for; must not benull- Throws:
NullPointerException- ifserviceIdentifierisnull- See Also:
getServiceIdentifier()
-
-
Method Detail
-
getServiceIdentifier
public final String getServiceIdentifier()
Deprecated.Returns the identifier of the service thisServiceConfigurationimplementation provides configuration for.This method never returns
null.- Returns:
- the identifier of the service this
ServiceConfigurationimplementation provides configuration for; nevernull - See Also:
ServiceConfiguration(String)
-
getPropertyNames
public abstract Set<String> getPropertyNames()
Deprecated.Returns an unmodifiable and unchangingSetofStrings representing the names of properties whose values may be retrieved with thegetProperty(String)method.Implementations of this method must not return
null.Implementations of this method must ensure that the
Setreturned may be used without the end user having to peform explicit synchronization.Implementations of this method may return the same
Setinstance with each invocation, or differentSetinstances with different contents.- Returns:
- an unmodifiable and unchanging
SetofStrings representing the names of properties whose values may be retrieved with thegetProperty(String)method
-
getProperty
public final String getProperty(String propertyName)
Deprecated.Returns a value for the property described by the suppliedpropertyName, ornullif no such property value exists.This method may return
null.- Parameters:
propertyName- the name of the property whose value should be returned; must not benull- Returns:
- a value for the property described by the supplied
propertyName, ornull - See Also:
getProperty(String, String)
-
getProperty
public abstract String getProperty(String propertyName, String defaultValue)
Deprecated.Returns a value for the property described by the suppliedpropertyName, or the value of the supplieddefaultValueparameter if no such property value exists.Implementations of this method may return
nullifdefaultValueisnull.Implementations of this method may return the same or different values for each invocation with the same parameters.
- Parameters:
propertyName- the name of the property whose value should be returned; may benullin which case the value of the supplieddefaultValueparameter will be returned insteaddefaultValue- the value to return if a value for the named property could not be found; may benull- Returns:
- a value for the property described by the supplied
propertyName, or the value of the supplieddefaultValueparameter
-
getInstance
public static final ServiceConfiguration getInstance(String serviceIdentifier)
Deprecated.Returns the soleServiceConfigurationimplementation in effect for the currentSystems and identified by the suppliedserviceIdentifier, if there is one, ornullif there is no suchServiceConfiguration.- Parameters:
serviceIdentifier- the service identifier for which aServiceConfigurationshould be sought; must not benull- Returns:
- the sole
ServiceConfigurationimplementation in effect for the currentSystems and identified by the suppliedserviceIdentifier, if there is one, ornull - Throws:
NullPointerException- ifserviceIdentifierisnullServiceConfigurationError- if there was a problem loading Java services- See Also:
getInstance(String, Properties)
-
getInstance
public static final ServiceConfiguration getInstance(String serviceIdentifier, Properties coordinates)
Deprecated.Returns the soleServiceConfigurationimplementation in effect for the currentSystems and identified by the suppliedserviceIdentifierand suitable for the suppliedcoordinates, if there is one, ornullif there is no suchServiceConfiguration.This method may—and often does—return
null.While the current implementation of this method performs no caching other than that performed as a side effect by
ServiceLoadermethod invocations, caching is deliberately not a component of the specification of this method's behavior.- Parameters:
serviceIdentifier- the service identifier for which aServiceConfigurationshould be sought; must not benullcoordinates- aPropertiesobject containing coordinates that might assist aServiceConfigurationimplementation in implementing itsgetPropertyNames()andgetProperty(String)methods; may benull- Returns:
- the sole
ServiceConfigurationimplementation in effect for the currentSystems and identified by the suppliedserviceIdentifier, if there is one, ornull - Throws:
NullPointerException- ifserviceIdentifierisnullServiceConfigurationError- if there was a problem loading Java services
-
-