Package org.kiwiproject.config.provider
Class NetworkIdentityConfigProvider
- java.lang.Object
-
- org.kiwiproject.config.provider.NetworkIdentityConfigProvider
-
- All Implemented Interfaces:
ConfigProvider
public class NetworkIdentityConfigProvider extends Object implements ConfigProvider
Config provider that determines the named network on which the service is running.This is useful when a system of services are deployed in multiple locations like separate AWS VPCs or subnets.
Default resolution lookup keys are as follows:
- System Property: kiwi.network
- Environment Variable: KIWI_NETWORK
- External Config File: network
- See Also:
for resolution order
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
canProvide()
Determines if a provider has enough environmental awareness to provide data.Map<String,ResolvedBy>
getResolvedBy()
Returns a mapping of config fields to how the field was resolved.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.kiwiproject.config.provider.ConfigProvider
canNotProvide
-
-
-
-
Method Detail
-
canProvide
public boolean canProvide()
Description copied from interface:ConfigProvider
Determines if a provider has enough environmental awareness to provide data.- Specified by:
canProvide
in interfaceConfigProvider
- Returns:
true
if the provider can provide data, otherwisefalse
-
getResolvedBy
public Map<String,ResolvedBy> getResolvedBy()
Description copied from interface:ConfigProvider
Returns a mapping of config fields to how the field was resolved.- Specified by:
getResolvedBy
in interfaceConfigProvider
- Returns:
- a mapping of config fields to how the field was resolved
- See Also:
ResolvedBy
-
-