public interface GatewayFramework
A GatewayApplication introduces itself to the framework using the
DiffusionGatewayFramework.initialize method which returns a reference of
this type that the application can use initiate the initial connection to
Diffusion.
| Modifier and Type | Method and Description |
|---|---|
void |
connect()
Connect to Diffusion and register the application.
|
String |
getConfiguration()
Returns the full configuration for the declared gateway application.
|
ScheduledExecutorService |
getExecutorService()
Returns instance of
ScheduledExecutorService initialized by the framework
using the thread pool configured in configuration file. |
boolean |
isMetricsEnabled()
Returns a boolean value to represent whether metrics is enabled in the
configuration, by application user.
|
void |
shutdown()
Shuts down the framework.
|
void connect()
throws ApplicationConfigurationException,
DiffusionSecurityException,
DiffusionClientException,
ApplicationInitializationException
ApplicationConfigurationException - if the passed configuration or
configuration obtained from the server has been found to be invalid
or incompatible with the application;DiffusionSecurityException - if the application principal
does not have sufficient permissions to perform the operation;DiffusionClientException - if some other exception has been returned from the
Diffusion server via the Diffusion Client API.
The cause will provide more detail.ApplicationInitializationException - if connect fails for any other reason.String getConfiguration()
This returns a full representation of the whole configuration which can be saved and used when restarting the application to override any configuration saved at the server.
This will only be available after the framework has connected to the Diffusion server.
The configuration is updated whenever a service is added, updated or removed. This method returns the current state of the configuration.
void shutdown()
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.ScheduledExecutorService initialized by framework.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.
Copyright © 2023 DiffusionData Limited. All rights reserved.