public interface ApplicationContext
GatewayApplication
.
It provides the application with the configured details of the GatewayApplication
and any other resources that the framework provides.
This is passed to the GatewayApplication.initialize(com.diffusiondata.gateway.framework.ApplicationContext)
method.
Modifier and Type | Method and Description |
---|---|
ScheduledExecutorService |
getExecutorService()
Returns instance of
ScheduledExecutorService initialized by the
framework using the thread pool configured in configuration file. |
Map<String,Object> |
getGlobalConfiguration()
Returns the configured global parameters for the application.
|
String |
getId()
Returns the application identifier as supplied in the configuration.
|
boolean |
isMetricsEnabled()
Returns a boolean value to represent whether metrics is enabled in the
configuration, by application user.
|
String getId()
boolean isMetricsEnabled()
This can be used to check whether components required to expose metrics should be instantiated.
By default, exposing metrics is disabled in gateway application.
Map<String,Object> getGlobalConfiguration()
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.
ScheduledExecutorService getExecutorService()
ScheduledExecutorService
initialized by the
framework using the thread pool configured in configuration file.
This can be used to schedule processing in separate threads if required by service handlers.
When shutting down the application, this thread pool will be terminated by the framework.
ScheduledExecutorService
managed by framework.Copyright © 2024 DiffusionData Limited. All rights reserved.