public abstract class ServiceConfigurationProvider
extends java.lang.Object
ServiceConfiguration instances.buildFor(Set, Properties),
ServiceConfiguration| Modifier | Constructor and Description |
|---|---|
protected |
ServiceConfigurationProvider(java.lang.String serviceIdentifier)
Creates a new
ServiceConfigurationProvider. |
| Modifier and Type | Method and Description |
|---|---|
abstract ServiceConfiguration |
buildFor(java.util.Set<? extends System> systems,
java.util.Properties coordinates)
Given a
Set of Systems and an optional Properties object representing coordinates identifying
a configuration space in which configuration discovery is to take
place, returns a new ServiceConfiguration appropriate for
the configuration space implied by the supplied parameters,
or null if no such ServiceConfiguration
is applicable. |
protected static System |
getAuthoritativeSystem(java.util.Set<? extends System> systems,
java.util.Properties coordinates)
Given a
Set of Systems, returns the System from that Set that is deemed to be the
authoritative system, either because it is the only enabled member of the Set or it is
the first enabled member of the
Set whose System.isAuthoritative() method returns
true, or null if there is no
authoritative System to be returned. |
java.lang.String |
getServiceIdentifier()
Returns the identifier of the logical service this
ServiceConfigurationProvider implementation provides
ServiceConfiguration instances for. |
protected ServiceConfigurationProvider(java.lang.String serviceIdentifier)
ServiceConfigurationProvider.serviceIdentifier - the identifier of the service this
ServiceConfigurationProvider implementation will provide
configuration for; must not be nulljava.lang.NullPointerException - if serviceIdentifier is
nullgetServiceIdentifier()public final java.lang.String getServiceIdentifier()
ServiceConfigurationProvider implementation provides
ServiceConfiguration instances for.
This method never returns null.
Repeated invocations of this method will yield identical return values.
ServiceConfigurationProvider implementation provides ServiceConfiguration instances for; never nullServiceConfigurationProvider(String)public abstract ServiceConfiguration buildFor(java.util.Set<? extends System> systems, java.util.Properties coordinates)
Set of Systems and an optional Properties object representing coordinates identifying
a configuration space in which configuration discovery is to take
place, returns a new ServiceConfiguration appropriate for
the configuration space implied by the supplied parameters,
or null if no such ServiceConfiguration
is applicable.
Implementations of this method may—and often
will—return null.
Multiple invocations of an implementation of this method must
result in distinct, though perhaps equal, ServiceConfiguration instances.
Implementations of this method may rely on the fact that all
members of the supplied Set of Systems will be
enabled.
Implementations of this method must not call the ServiceConfiguration.getInstance(String, Properties) method, as an
infinite loop may result.
systems - a Set of Systems found to be in
effect; may be nullcoordinates - a Properties object containing hints
that may help in the implementation of the ServiceConfiguration to be returned; may be nullServiceConfiguration suitable for the
configuration space implied by the supplied parameters,
or null if no such ServiceConfiguration
is applicableServiceConfiguration.getInstance(String, Properties)protected static final System getAuthoritativeSystem(java.util.Set<? extends System> systems, java.util.Properties coordinates)
Set of Systems, returns the System from that Set that is deemed to be the
authoritative system, either because it is the only enabled member of the Set or it is
the first enabled member of the
Set whose System.isAuthoritative() method returns
true, or null if there is no
authoritative System to be returned.
This method may—and often does—return null.
A System is deemed to be the authoritative system if
it is enabled and either of the
following is true:
Set of Systems.systems - the Systems to inspect; may be nullcoordinates - a Properties object containing hints
that may help in the implementation of this ServiceConfigurationProvider not currently used but reserved for
future use; may be null.System that is deemed to be authoritative,
or null if no such System could be
foundCopyright © 2018, Oracle and/or its affiliates. All Rights Reserved. Use is subject to license terms.