public interface SharedConfig
A SharedConfig defines a map of shared configuration information that can be used by one or more services. Typically, an application writer will use SharedConfig when more than one service can use the same sets of configuration such as connection details for a back end data source or sink.
If a sharedConfig has been declared for a service then this will be passed as
part of the ServiceDefinition
provided to the
GatewayApplication
factory method used to instantiate a
ServiceHandler
.
Modifier and Type | Method and Description |
---|---|
UUID |
getId()
Returns the sharedConfig identifier.
|
String |
getName()
Returns the sharedConfig name.
|
Map<String,Object> |
getParameters()
Returns the sharedConfig parameters as defined by the configuration.
|
String |
getType()
Returns the sharedConfig type.
|
String getName()
The sharedConfig name uniquely identifies an instance of a sharedConfig that is
configured according to the schema of the SharedConfigType
named by
getType()
.
UUID getId()
The sharedConfig id uniquely identifies an instance of a sharedConfig that is created by the framework. ID of a sharedConfig instance is set when it is created and changes when the sharedConfig is updated. This can be used to internally identify different sharedConfig instances with same names.
String getType()
The sharedConfig type defines the schema for the sharedConfig configuration
parameters. A sharedConfig type with the given name will have been declared
by the GatewayApplication
via its
getApplicationDetails
method during startup.
Map<String,Object> getParameters()
The parameters are passed as a map of String keys and Object values which represent the application specific JSON configuration object.
The types of the map values will depend upon the configuration structures. For a simple JSON object with all String values, the values would be of type String. For other JSON primitive value types the value types could be String, Integer, Double etc. For more complex JSON structures the type could be List (for a JSON array) or Map (for a JSON object} and these could have values of any of the previously mentioned types.
Copyright © 2024 DiffusionData Limited. All rights reserved.